@ PaulS
PaulS:
So, I should create a function that handles the delay of the solenoid valve?
That would depend on when you want to call it, and what it does.
If this is correct, does this have any other effect other than "cleaning" up the code?
Maybe. Maybe not. Depends on the function. Sometimes, moving code to a function makes the code harder to follow, so creating a function is not always desirable. Usually, yes. Always, no.
You should really change your name to "Confucious"
![]()
But I eventually figured out what you want (I think) so will update the code shortly with the code from the blink without delay example.
So in essence, while the delay is running, no other input can be read, as the whole system is on hold during the delay time. SO no processing can happen while the delay is running! Good work PaulS ![]()