Digital output interruption in a "While" loop?

Hi guys
I'm a rookie doing its first useful project on an Arduino nano. I have 2 easy questions:

  1. When a variable condition is "True" when monitoring an input adress and I then set a digital output to HIGH, its value will be 5V and will remain 5V unless the variable condition has changed (or the Arduino is shut down), right?

  2. What happen if the variable condition evaluation is within a "While" loop? Could the output voltage have very short voltage interruption during the execution cycle of the "While" loop?
    (I don't know if the electronic device that receives that output is sensitive to very short interruption in the magnitude of some miliseconds)

Please rephrase your questions.

Perhaps showing us an example sketch is warranted.

Your program only executes one instruction at a time.

If you are not writing inside the loop, the output-state won't change. For example, if you turn an LED on, it won't go off until you turn it off.

And, if you are not reading the input inside the loop it's not getting re-read either unless you are actually using [u]interrupts[/u].

Normally, you are not continuously "monitoring" an input. You may be reading it (AKA "polling it") once every-time through the main loop. Usually your main loop is doing several other things which means most of the time the input is being ignored.

Hello coolboot,

Question 1, if I understood correctly, yes, correct.

Question 2, I am struggling to understand what you mean so please ask again differently, preferably using an example with some code, posted with code tags as per the forum instructions:
General guidance and
How to use this forum

Thank you.