I'm looking for guidance with my new project. I built kitchen timer base on Arduino Uno, 2004 LCD display and 4x4 keypad. It works perfectly fine; however, it is only one channel timer. I like to add one or more channel, to have two (more) timers in one. I do not know how to approach the new task. I'm not looking for complete, just suggestion. For me, now it is multitasking, and I know it is impossible with Arduino Uno. Must be different way, to simulate this. I found only one source on internet One Kitchen Timer To Cook It All - Hackster.io] but it is extremally difficult to understand complicated code, and I like to write my own code, where I understand every single details.
Thx in advance
No need to multitask. Just use millis to keep track of how much time has elapsed on each timer and display them all once a second.
Which function did you use to do the timing in your timer project ?
Was it delay() or millis() ?
If it was delay() then see Using millis() for timing. A beginners guide, Several things at the same time and the BlinkWithoutDelay example in the IDE
Adding additional channels is easy with millis(). Each channel only requires its own previous time stamp (one 32 bit variable). Smooth sailing.
We could help more better and aim suggestions at your level of competence if you were only to share the code from your successful one channel timer.
So do that. Post your code.
TIA
a7
Thx - I will jump to mills solution. Now I have delay.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.