this alarm is using the phone light, when we set the alarm clock then put the phone in the dark box which made by glue and cardboard to prevent any other light source to affect the L.D.R. Job.
to made it we need:
1- Arduino board. -i have Uno one-
2- some wires for connect parts together.
3-12v to 9v DC power source. -i have 9v dc adapter-
4-100K resistor & LDR.
6-12v dc power supply. -i have my old pc power supply-
7-the water bump (the hole mechanism) which we use to clean car's front glass.
8-some pieces of wood and screws to attach the bump to the bed.
9-cardboard and glue to make the dark box.
Step 1: Make the Dark Box Where We Will But the LDR and the Phone.
we get the cardboard and cut four pieces to make for walls box to put the phone on.
and we put the together by the glue, and cover it with a piece of paper like the dome to put the phone under it and prevent outer light sources affecting the circuit job.
Step 2: Make the LDR Circuit.
we then make the L.D.R. circuit and the transistor to get the signal to the Arduino and send it to the power supply to turn it on.
Step 3: The Arduino Program.
we make the Arduino program, i just use bin 13 to make sure that the program work god.
note that : the built in led on bin 13 used also as low battery indicator, if you use a battery as a power source and it get out of power this led will keep illuminating and the program will stop working.