I am working on a project using an Arduino Mega and an LCD Shield. the object of my project is to make a timers computer where I set 2 parameters:
1/ how many minutes a day I want the timer on
2/ How many cycles per day the timer must switch on
I will the have a mapping statement somewhere the Arduino will take the total minutes on and divide by the cycles. That is the basic project. Also whilst I am it I will put a clock into it as well.
I have been working through the menu system and have hit a dead end. the issue is from line 192 of the attached sketch. What I would like here to happen is as I enter the TIMERS then pushing the up and down buttons the menu scrolls through and round the 8 timers. This does not happen. I get to Timer 1 Setup but does not scroll.
Can somebody pls have a look and see where I am going wrong.
AquArt_FTm_C_temp.ino (4.01 KB)
Void_Functions.ino (8.91 KB)
the issue is from line 192 of the attached sketch.
No it isn't. When Timers() is called, is does ONE thing, and then returns.
The value that it switches on is set in TimersButton(), which calls Timers().
There are NO comments in the code to explain what it is supposed to be doing. A week from now, you won't remember, either.
Sorry about the no comments, I wrote this and have been going around in circles trying to get it to work I forgot about the comments. Anyway what I would like to happen is that when I have reached the state TIMERS I the push buttons up/down to scroll through timer set up 1-8. My initial thought was when I get to TIMERS (static state) I move to SWITCH (transitional state) to timers() which then be controlled by the TimersButton() but it does not work. Any ideas
My initial thought was when I get to TIMERS (static state) I move to SWITCH (transitional state) to timers() which then be controlled by the TimersButton() but it does not work.
It doesn’t work, because when you get to the TIMERS state, you call timers() ONCE. Since timers() is not a blocking function, it can not be “controlled by the TimersButton()” (which is a stupid name for a function, since it is NOT a button (or even a switch)).
Rethink what you are doing.