Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

German Version

The digital output is the simplest way to generate an electronic signal on an Arduino. This signal only knows two states, ON and OFF. With the Arduino, ON stands for a voltage of 5V and OFF for a voltage of 0V or a connection to GND. The easiest way to visualize the functionality of the digital output is to switch an LED on and off. A series resistor is required for this since most LEDs cannot withstand a voltage of 5V and we first have to "destroy" voltage through the resistor. For the calculation, we need the forward voltage (VF) and the forward current (IF) of the LED. We find this information in the datasheet of the LED.

...

RV = (Uges - UD) / I 
RV = (5V - 2V) / 0.025A
RV = 3V / 0.025A
RV = 120 Ω

For programming, we have to switch the digital PIN 13 on and off again and again if we want to make the LED flash. The following code does just that.

...