I'm new, just now getting kinda comfortable using millis(), so I think I'm on the right track. That said, I am thinking about trying to build a working alarm clock. I'm fairly confident with the assembly, soldering, etc. However, when it comes to the code, there are so many directions to go I get lost. I've Googled what's out there already. I thought I'd ask the community if they have ever built a Arduino UNO/Nano based alarm clock and if they could share a quick explanation of their approach and the code. For the most part, I'm interested in alarm clock code that uses a 12H AM/PM day.
Did a color clock for a couple friends. The idea was that it took less brain power to just look at a color in the middle of the night than fumble around for glasses and then try to decipher the time to see if they could keep sleeping or have to get up soon.
Used a RTC breakout from Adafruit I had laying around and an OLED. Version two dropped the OLED and used a neoPixel. I included a text parser over the serial port for doing setup and control type stuff. What time it is, what color maps to what time, fine tuning of colors etc.
tperry724:
I should mention that I’ve built several clocks before but they only displayed the time. Thanks again everyone.
Well, if you have already built several clocks before, then the rest should be easy, but.........
(and there is always a but)
Did you really understand the code that ran those clocks?
If you understand that code, then all you have to do is check if the alarmSetTime is equal to currentTime, and sound the alarm. So do you understand that code or not? Do you have any examples of the code your are using?
Randy