UKHeliBob:
Not true.What you need to do is to break down the actions in your program into small steps and execute each step in order. Between each step you can then do something else such as executing a small step in another aspect of the program and/or read in input to determine whether it has changed, for instance. Then you go back and execute another small step and so on.
If you have not already done so then look at Using millis() for timing. A beginners guide, Several things at the same time and look at the BlinkWithoutDelay example in the IDE.
You're right,I was able to achieve the desired result when I put all the code in the main sketch but using classes will also make the code tidier and easier to read.
Maybe my question should be: why my greenAlternate() won't operate properly when I put it inside the class?
P.s. Trust me, in 5 days I read all sorts of things ![]()