Sound

CIRCUIT:

Sound

To build this circuit, push the LDR into the breadboard with one leg connecting to A7 and the other to the ground rail. Plug a 10k resistor from the 5v power rail to the same analog pin, A7. Now plug in the speaker, connecting the right pin to the ground rail and the left pin to D11.

CODE:

This code emits a different tone depending on the amount of light detected.

Leave a Reply

Your email address will not be published. Required fields are marked *