wakeup the sun is up!!
i decided to make an alarm that wakes me up when the sun is up by using light sensor and a buzzer that wakes me up instantly!
arduino ide for compiling and debugging
I used tinkercad for design
arduino uno
photoresistor
buzzer
jumper wires
power supply
I used buzzer as output and light sensor as input in this project
using code blocks i used if condition
the programmed the components using code blocks
i used if block
as if the read of light sensor is high then it will set the pin of buzzer to high and if it's not high so the buzzer pin is set to low
the switched to text mode
i tested the code one tinkercad and it worked!! time to make it?
adding the code to arduino ide and uploaded it to start the physical implementation
here i tested the code and everything worked out fine so i put it into a simple enclosure link
by using source of light to simulate the sun i got it closer so the buzzer made sound when i got it further the sensor read was low to buzzer turned off
i connected brown wire from ground to the positive side on the breadboard
i connected whitewire from 5v to the negative side on the breadboard
i connected the ldr sensor to A0
and the other two treminals gnd to the positive side and the vcc to the negative side of the breadboard
the buzzer was connected negatve to ground and positive to pin 10
i had a problem with this sensor as i didn't find it on tinkercad so i used the help of my instructor and used a preusede circuit i searched on google and found link