I connected 4 LED's to the Arduino as a feedback mechanism. When there is no light 4 LED's are on. A little light turns 3 LED's on and at next stages we have 2 or 1 LED on. When there is sufficient light detected by LDR there is no on LED. LED's will be on randomly. for example when we have to turn two LED's on it's not dictated that 1st or 2nd LED should be on. I used rand() function to choose which LED's should be on in each state.
Download link:
Comments
Post a Comment