I want to create a clock program that, every time the time ends in a 5, the time will jump by 5 minutes (e.g., one minute after 12:05 the clock jumps to 12:10). How would I go about doing this based on the looping code below? (lander_display refers to the Adafruit 4-digit display I am using) (I am specifically programming the clock not to follow a 60-minute setup or reset at 12:59)
for (int i = 1200; i < 9999; i++) {
delay(60000);
lander_display.showNumberDecEx(i+1, 0b01000000);
As I wrote that, I thought; If I add 5, the value might still be a multiple of 5... my long way was to move close to 5, let time move a little farther away from the whole value, then add one more minute to jump over the multiple of 5. I also thought of jumping to 6, then subtracting. Not tested.