Hello, I am new to the forum and new to arduino. I currently working a project that has me stumped. I am trying to build a clock for my classroom that will tell the time and activate a “traffic light” at the appropriate times during the day. For example:
- Green light on at the start of class
- Yellow light on at 10 minutes to the end of class
- yellow and red at 5 minute to end of class warning
- red light on a the end of class
I would also like to able to scroll messages across my clock at the 10 and 5 minute warning times.
I also need to the code to watch the days of the week because our school has a different bell schedule on monday then the other days.
With the help of a friend that helped me tweek the final code I have managed to program a clock with a 16X32 dot matrix from adafruit , an Arduino Uno R3, and I am using a D3231 RTC with the D3231.h library from rinkydinkelctronics.com. The clock part works great.
When I try to add the scrolling text, the scrolling text “stutters”.
I am not sure how to proceed to combine all the things I would like this code to do. Do I use Case/Switch or state machines or what? I have researching this for a while and I could use some advice on how to start. I don’t want to overcomplicate my code.
Any tips would be appreciated.
The following files are the clock code and the modified code that is glitchy.
Matrix_Clock.ino (2.52 KB)
Matrix_Clock_Scrolling.ino (4.3 KB)