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
alarmclock.h
- Committer:
- gaebu
- Date:
- 2014-01-21
- Revision:
- 0:62a6f55722d9
- Child:
- 1:8a7f4f79f84d
File content as of revision 0:62a6f55722d9:
//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();