Alarm Clock
August 2024
Over the Summer, I wanted to decrease screen time by moving my phone out of my bedroom. I did not have an alarm clock to fall back on if I kicked out my current waking solution so I elected to try an build one using a Raspberry Pi. As always, this was easier said than done.
The design incorporates a 7-segment display to display the time, buttons to snooze or turn off the alarm, and a buzzer to act as the alarm itself. The code to determine when the buzzer should go off was delightfully straighforward and the software side of the alarm functionality was done within the hour. Incorporating the hardware took much more time. The buttons and the buzzer were easy to add into the mix, but the 7-segment display took much more time to get working. The final code that allowed the time to be displayed took 6 nested loops to streamline the setup process and allow for each segment to be individually addressed within the code. Once the pins were set up, the task became trivial once again as taking advantage of the predefined segments was a matter of plug-and-play.