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:
- 2016-01-05
- Revision:
- 2:fbf734bc04de
- Parent:
- 1:8a7f4f79f84d
File content as of revision 2:fbf734bc04de:
//variables int temp; int i; int pulses; volatile int sleeptimer; volatile int bltimer; //int sleeptime_set; volatile char menu, menuold; char menuDisp; char set_td_menu; char x_day[20]; char x_time[16]; char alarmtime[6]; char cbuf; volatile char wheelturned; volatile bool blstate;//, blstateold; bool alarmset; bool alarmon; bool alarmset2; bool alarmon2; bool change_alarm_min; bool change_alarm_hour; volatile bool wheelpushed,wheelpushedlong,wheelpushchanged; volatile bool change_sleeptimer;//, sleeptimerstart; struct tm alarm; struct tm alarm2; struct tm al_to_change; struct tm *newtime; time_t seconds; Ticker ticker; Timeout blTimeout; //functions void clearmenu(); void setalarm(char alnb); void settimedate(); void printmenu(int selectedline); void backlight (bool onoff); void checkbutton(); void setsleeptimer(); void ticker_tick(); void blTimeout_tick();