I am currently working on a small simple project: the LED will keep on blinking when the room is bright and go to sleep mode when the room is dark to save power, by using interrupt with sleep mode.
At first it run through setup function - works fine
then go through the loop function - works fine - LED keeps on blinking
When room surrounding is dark - it can print the “OOOOOHH its dark”
but after that the LED just lights up and arduino does not goes into sleep mode!
I dont understand why is it so and I search on the internet , and I still cant find the solution and I am still new into Arduino as my dad tell me to learn it :o :o
Thanks in advance if anyone can give me any insight as to what is wrong with my code.
sketch_1.ino (994 Bytes)