HIGH | LOW

HIGH

The concept of HIGH (as applied to the output) may differ slightly depending on whether the output is configured as an input (INPUT) or an output (OUTPUT). If the pinMode function is configured as an input (INPUT), then when reading data from it (digitalRead function), the microcontroller will respond with HIGH in the event that a voltage of 3V or more is present at the output.

It is also possible that the pinMode function is configured as an input (INPUT), after which a high level HIGH is applied to the digitalWrite function. In this case, internal pull-up resistors with a nominal value of 20 kΩ will be connected to the output, resulting in a high level HIGH. When reading, the HIGH value will be held until the external circuits on the output form a low LOW level. This is how the INPUT_PULLUP mode works.

If the pinMode function is configured as an output (OUTPUT) and the digitalWrite function is high HIGH, then a 5V voltage is established at the output. In this mode, it can be a current source and, for example, light up the LED connected in series through a resistor to ground or to another output with the LOW level.

LOW

The concept of LOW also has different meanings depending on whether the output is configured as an input (INPUT) or output (OUTPUT). If the pinMode function is configured as an input (INPUT), then when reading data from it the digitalRead function the microcontroller will respond LOW when the voltage at the output does not exceed 2V.

If the pinMode function is configured as an output (OUTPUT) and the digitalWrite function is at a low LOW level, then a 0V voltage is established at the output. In this mode, it can receive a flowing current, for example, from an LED connected through a resistor to + 5V or to another output with a HIGH level.