Answer the question
In order to leave comments, you need to log in
How to make 2 unrelated timers?
there are 2 relays, they should work independently, for example, there is button 1 and button 2, press button 1 and relay 1 closes for 10 seconds, if you press button 2 at this time, then relay 2 closes for 5 minutes,
the problem is that while 10 seconds 5 minutes will not pass, but if instead of 10 seconds there will be a long time? ..
how to get out of the situation?
how to force delay(5000); work in parallel?
Answer the question
In order to leave comments, you need to log in
No need to force.
It is necessary to refuse delay(), absolutely.
And there will already be something for the soul, you can use the timer, or millis ()
As an example, see the topic "blinking the LED without delay".
I advise you to start learning automation. Because on a PLC (Programmable Logic Controllers) the program consists of two single vibrators
How do I go to Arduino?
1) practice programming in Codesys text and graphic languages
2) you can take other languages for Arduino
3) you can develop an algorithm in Stateflow (MatLab and Simulink state graph language) and translate it into Arduino.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question