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:
- 1:8a7f4f79f84d
- Parent:
- 0:62a6f55722d9
- Child:
- 2:fbf734bc04de
--- a/alarmclock.h Tue Jan 21 12:35:29 2014 +0000 +++ b/alarmclock.h Tue Aug 26 21:32:24 2014 +0000 @@ -4,6 +4,7 @@ int readchar; int sleeptimer; +//int sleeptime_set; char menu, menuold; char menuDisp; char set_td_menu; @@ -19,14 +20,15 @@ bool alarmon2; bool change_alarm_min; bool change_alarm_hour; -bool wheelpushed,wheelpushedlong; -bool change_sleeptimer, sleeptimerstart; +bool wheelpushed,wheelpushedlong,wheelpushchanged; +bool change_sleeptimer;//, sleeptimerstart; struct tm alarm; struct tm alarm2; struct tm al_to_change; struct tm *newtime; time_t seconds; +Ticker ticker; //functions void clearmenu(); @@ -35,4 +37,5 @@ void printmenu(int selectedline); void backlight (bool onoff); void checkbutton(); -void setsleeptimer(); \ No newline at end of file +void setsleeptimer(); +void ticker_tick(); \ No newline at end of file