second arduino project finished.
A photograph of the assembly:http://www.frozenchaos.net/Arduino/arduino_alarm.jpg
So I wanted to make an alarm clock since my current one is being 'fidgety' (It takes some fidgeting when putting the alarm on, to get it to detect that its supposed to be on.
While I don't have a problem remembering to set my alarm (and even turning it on).. it is sometimes a concern, so que.. wifi capabilities. Whats nicer than being able to set your wakeup times for the upcomming week? So you wake up, ready to go to school / work.. you arrive there.. no teacher / closed door. Ok.. so you sit down behind a school computer / go home. You check your e-mail... great, at ### in the morning, they sent you an e-mail moving the appointment.
Excuse #2 to put wifi on the alarm clock. Now something akin to bld's wifi tank is also something I'd like to do at some point, but for now a simple alarm clock will have to do!
So thats my criteria:
- update its alarm time from the server
- use the server to get the number of unread e-mails from my inbox
- synchronise the time of the clock with the server
- provide an annoying noise to wake me up
- snooze functionality
- IR remote (flailing my arm or foot around trying to hit that blasted button just isn't comfy when my room is freezing cold!) to turn off the alarm / hit the snooze button.
That explained, time to provide the goods!
3 resistors (2x 1k and I believe 10k (red red brown gold))
1 buzzer (I used a sonitron 6MA-21L, but any one that works at 5V will probably do)
1 IR receiver (I used a TSOP853 with breakout from sparkfun, there are cheaper ones out there)
1 4x20 LCD that works with the LiquidCrystal display, forgot what the common interface is called..
1 Asynclabs Wishield 2.0 (without antenna)
1 PC with the following software: apache, php5, php-imap (a php library). This PC has been given the static address of 192.168.1.200 in my network.
Since I don't have a diagram.. I'll have to explain the wiring (some vcc / ground references have been omitted, see the items instruction on the playground for details)
digital6 -> IR receiver signal pin
digital8 -> buzzer + (the - side with the 10k? resistor to ground)
digital9 -> LED + (the - side with a 1k resistor to ground)
analog0 (digital14) -> LCD signal line 0
analog1 (digital15) -> LCD signal line 1
analog2 (digital16) -> LCD signal line 2
analog3 (digital17) -> LCD signal line 3
analog4 (digital18) -> LCD enable
analog5 (digital19) -> LCD reset
wishield 2.0 - interrupt jumper to d2, LED jumper removed and the remaining jumper on d7.
The thing missing is the contrast wiring of the LCD, I used a static ... whatyamacallit (sorry, I'm a coder, not an electrical engineer) with a diode and a resistor.
Will put the code of the server side parts and arduino in following posts (not enough space left in this one).
The libraries used can be found here
The date and beeper libraries I wrote myself, they're free to use in whatever way you want. The IRRecv library is a modified version of the IR remote library that can be found on the playground, I don't claim ownership of this nor credit. Thanks for doing the hard work for me, I just wanted something slightly different, and have changed the library to fit accordingly.
The WiServer library can be found on http://www.asynclabs.com
, and the WString library also on the playground.