post #2

For this circuit, I used three LEDs and one LDR. What I tried to do was for one of the LEDs to always be on, one to only turn on when the LDR was covered, and one to blink when the LDR was covered. In my Arduino code, I made it so that the first LED would simply always be on, the second was coded so that if the ldrstatus was less than 400 then the LED would turn on, and off if it was above 400, and for the final one I made a blink. To do this I just coded for the LED to turn on when the ldrstatus was less than 400, a delay of 500, then make the LED low, and another delay, and so on. Attached to the post are two images of my circuit working, my schematic (which is probably wrong) and my code in Arduino. 

Leave a Reply

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