Back to Parent

Here is the completed circuit with the switch. When the switch is turned on, the photo-resistor takes in a light reading and it displays on the LED (with it being lit up if there is a lot of light). When the switch is turned off, the LED light is off too. 

I had a tough time understanding what was going wrong with my circuit because it was not working at first. I was connected the terminal of the switch to ground, but not to the power. Also in my code, I was only reading the switch input once. I had to move that line into the loop. 

Now I got it working :)) 


Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!

0