This is all done by the Arduino and some python coding.
Step 1: Get the Parts
-5V DC Relay
-1N004 Rectifier Diode
-2N2222 NPN Switching Transistor
-CAT5e Wall Jack
PLEASE READ THIS:
Please note that to turn on and off the alarm clock you need one that you would normally turn on and off with a switch. You should NOT use an alarm clock that requires you to press a switch to turn it on and press a button to turn it off.
Step 2: Hack the Alarm Clock
First take apart your alarm clock and find were the switch is. Get to where the switch is and solder two wires to that. Now you can take out were the old button was and route the wire along the alarm clock. Then take some CAT5e, strip the end and then use the blue pair and connect them to the two wires that we soldered to the alarm clock. Now bend the other pairs on the CAT5e cable back a little so now you can use them to hold the wire in.
Now you have successfully hacked your alarm clock.
If you have ran into trouble here read the bottom of the first page on this instructable.
Step 3: The Relay Circuit
I have put the image of a sort of like schematic thing below. If you have any question just post them below.
Solder it all into your breadboard and then make wires for your Arduino.
IMPORTANT NOTICE: Do NOT solder directly to the Arduino. Solder to a wire and then when your done soldering connect that to the Arduino.
Step 4: Software
This is all based on Python so we need to install Python 2.6.1
We also need to install pySerial to have communication to the Arduino.
Since you need pySerial you also need pythonWin.
Make sure that the Arduino Drivers are in your computer too.
Now that you have the base system installed we can download the code.
The software that will go and check the school closings is called PySchoolClock. That can be downloaded from the zip file below. PySchoolClock allows you to edit the action of school being on or closed. Inside the zip file is also snow.py. I have already changed the settings file to do that when closed. I have also deleted any action to take when it is open.
Now you must find which port your Arduino is plugged into. Do this by plugging in your Arduino and then starting the program. Then go to Tools>Serial Port and try to upload some code to each one. Once you have the serial port selected write it down.
Then open snow.py and on the second line remove COM6 and replace it with your serial port.
Now open Clock-GUI.exe and make all the changes you need to in that. DO NOT CHANGE THE ACTIONS! MAKE SURE THAT YOU SAVE TO THE PREVIOUS SETTING FILE! NO EXTENSION!
Step 5: Power Settings
If you are using a laptop make sure that you have told it not to go to sleep when you close the top.
1) Control Panel>Power Options
2) Set when plugged in to do nothing no time.
3) Go to advanced.
4) When i close the lid of my portable computer: Do Nothing.
Step 6: Setting the Alarm
1) Set the time, school name, and closings website in PySchoolClock (Military Time) (clock-gui.exe)
2) Save settings in PySchoolClock
3) Plug in box to computer, Alarm Clock into box
4) Set alarm clock for at least 2 minutes after computer.
5) Open up clock and make sure that every thing is working (Internet, Power, Clock is connected
6) Change mode on box to automatic. Make sure that the light on the alarm clock goes on signaling that it has been turned on.
7) See if it works!