Alarm Clock Stops

Hi apology’s in advanced my first post and first project. My project is an alarm clock with a relay output to drive a small radio. The problem is that the clock stops occasionally. The most recent incidents are as follows;
23/1 Clock started
27/1 Stopped at 19:29
5/2 Stopped at 04:24
5/2 Stopped at 19:22
6/2 Stopped 6:05
7/2/ Re loaded program from PC
13/2 Stopped at 5:27
25/2 Stopped at 18:04
I have attached a copy instruction sheet which may explain what I am trying to achieve with the clock. The code I have attached a cut down version that I am using at the moment unfortunately it is too large to post so is attached. I am using a genuine Arduino Nano. The switches are 3 position with centre off. The display is a 4 digit 1.2" 7-segment Backpack from Adafruit. The adjusting switch is a rotary encoder which includes a push button. All the switches have 10K pull up resistors.

So some advice please, as to what is stopping the program running. I understand it may be due to a memory overload but I don’t know which bit of code may be causing it. Could there be issues with the library’s I am using.

The sketch uses 8574 bytes of program storage space. Max is 30720. Global variables use 681 bytes of dynamic memory maximum is 2048 btes

MyAlarm_Clock18.ino (13 KB)

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.