Table of Contents
Components
This stage involves the following new components.
- Speaker
Excited by Light
We are now going to start on our first real sensor - the light sensor!
The light sensor we are using is called a Light Dependent Resistor (LDR). Its resistance changes based on the brightness of light shining on it. The brighter the light the lower the resistance.
Using the Arduino's analog input pins we can get a measure of the light levels in our program, and use it to change the way our LEDs flash.
- Create your voltage divider circuit as shown in the below diagram. The voltage output is made to Arduino analog input A1. Two 10K Ohm resistors in parallel results in a suitable 5K resistance.
- Change your Arduino program to read the value on A1 instead of A0 and upload it. Now, instead of the rotation sensor determining the flashing speed/which lights which are on, the light levels on the light sensor will.
Making sound with Light
By following this sound tutorial you'll create a light controlled noise machine (the tutorial refers to a 4.7k resistor, use two 10K resistors in parallel as you did above).
Tip: If your breadboard is getting a bit crowded then remove a few of the LEDs for the time being.
Next Stage
Congratulations. Now you can go onto the next stage. Stage 4!.