Music Alarm Clock
Here we build a music alarm clock. You can control an alarm clock or set the alarm through a touch switch.
Detect two crash switches' press-down status: Short press or long press. For the key 1, you can shift the open or close of the alarm clock through long press and set the hour time via short press. For the key2, you can set to decrease the minute through long press or set to increase the minute by short press.
int alarm_hour = 19; int alarm_minute = 45;
You can use the crash switch to control the time as well as the status of the alarm clock. Since mCookie can be easily stacked with LEGO boards, you can build a beautiful shell for your project with LEGOs.