You need to study the blinkWithoutDelay example - in order to manage several things at once you have to avoid using delay and start using timestamps.
You need to study the blinkWithoutDelay example - in order to manage several things at once you have to avoid using delay and start using timestamps.