I'm just figuring this out so pardon any possible poor explanation or terminology.
The basic is, I'm trying to control a servo like an oscillating fan. It moves from 0 to 180 and then back constantly in a do/while loop.
This do/while is activated once the ON trigger is sent (in this case for the fun of it it's and RFID key fob).
The problem I'm having is, while this do/while is going to keep the servo oscillating the program is locked in that state. By that I mean the other things I want to constantly check in void loop() are not being processed, such as "is someone trying to change the speed", "are they trying to turn it back off".
OFF/ON is controlled by the RFID card so I can easily have a check for the card in the do/while, but as far as the changing speed issue, I haven't figured that out yet.
I want the fan to keep moving but adjust speed without interruption. (To note: Speed change is also done by RFID just a different card - RFID is not necessary I just wanted to learn it as well so 2 birds 1 stone).
Lets say I move the fan control to a different thing like a button that when pressed cycles through speeds 1 thru 3. Will that help? Either way I'm still not sure how to keep an eye on other inputs if I'm locked into that do/while for the oscillating so the servo smoothly moves.