alarmclock with 2 alarm times, 128x64 LCD with KS0108, displays time / time&date / a menu to change time & alarms, rotary encoder with push button, relay which switsches on a hi-fi system or something else, a 1F- Cap as a backup supply
Alarmclock
features:
- alarmclock with 2 alarm times
- 128x64 LCD with KS0108
- displays time / time&date / a menu to change time & alarms
- sleeptimer, relay is switched of when timer runs out
- rotary encoder with push button
- relay which switsches on a hi-fi system or something else
- a 1F- Cap as a backup supply
todo/ desired improvements/ known issues:
- a more precise real time clock would be nice
- a speaker or beeper directly connected to the mbed
- there is a bug where the big font is not displayed correctly
Schematic:
/media/uploads/gaebu/alarmclock_mbed_128x64.pdf
Diff: alarmclock.h
- Revision:
- 0:62a6f55722d9
- Child:
- 1:8a7f4f79f84d
diff -r 000000000000 -r 62a6f55722d9 alarmclock.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/alarmclock.h Tue Jan 21 12:35:29 2014 +0000 @@ -0,0 +1,38 @@ +//variables +int temp; +int i; + +int readchar; +int sleeptimer; +char menu, menuold; +char menuDisp; +char set_td_menu; +char x_day[20]; +char x_time[16]; +char alarmtime[6]; +char cbuf; +char wheelturned; +bool blstate;//, blstateold; +bool alarmset; +bool alarmon; +bool alarmset2; +bool alarmon2; +bool change_alarm_min; +bool change_alarm_hour; +bool wheelpushed,wheelpushedlong; +bool change_sleeptimer, sleeptimerstart; + +struct tm alarm; +struct tm alarm2; +struct tm al_to_change; +struct tm *newtime; +time_t seconds; + +//functions +void clearmenu(); +void setalarm(char alnb); +void settimedate(); +void printmenu(int selectedline); +void backlight (bool onoff); +void checkbutton(); +void setsleeptimer(); \ No newline at end of file