user77943: 
There are four red LEDs and an Arduino in the picture. Each LED has a forward voltage of 2 V. My friend says that just digitalWrite(9,HIGH) will make the LEDs light without resistor and they won't be burnt. Is this true?

user14095: I am assuming you only have 5VDC available. Your friend is almost correct, it will work for a while however in the long run it will probably fail unless you are one of the lucky ones. What is the Vf (forward voltage drop) range of the LEDS (you state 2V), and are they matched by pairs, if not they will not illuminate evenly. You are forcing the arduino to output its maximum on port D9. I believe the current will not be within the microprocessor specifications. You are assuming a LED is a voltage device, it is not it is a current device. A resistor or constant current source is normally used to drive LEDs.  The LED driving circuit must provide sufficient current to light the LED at the required brightness, but must limit the current to prevent damaging the LED and driver. Typically, the forward voltage (Vf) of an LED is between 1.8 and 3.3 volts. It varies by the color of the LED. A red LED typically drops around 1.7 to 2.0 volts, but since both voltage drop and light frequency increase with band gap, a blue LED may drop around 3 to 3.3 volts. across an LED is approximately constant over a wide range but can vary from LED to LED.
LEDs are diodes and have a

77943: <p><a href="https://i.stack.imgur.com/P9Ulq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/P9Ulq.png" alt="enter image description here" /></a></p>
<p>There are four red LEDs and an Arduino in the picture. Each LED has a forward voltage of 2 V. My friend says that just <code>digitalWrite(9,HIGH)</code> will make the LEDs light without resistor and they won't be burnt. Is this true?</p>
 14095: <p>I am assuming you only have 5VDC available. Your friend is almost correct, it will work for a while however in the long run it will probably fail unless you are one of the lucky ones. What is the Vf (forward voltage drop) range of the LEDS (you state 2V), and are they matched by pairs, if not they will not illuminate evenly. You are forcing the arduino to output its maximum on port D9. I believe the current will not be within the microprocessor specifications. You are assuming a LED is a voltage device, it is not it is a current device. A resistor or constant current source is normally used to drive LEDs.  The LED driving circuit must provide sufficient current to light the LED at the required brightness, but must limit the current to prevent damaging the LED and driver. Typically, the forward voltage (Vf) of an LED is between 1.8 and 3.3 volts. It varies by the color of the LED. A red LED typically drops around 1.7 to 2.0 volts, but since both voltage drop and light frequency increase with band gap, a blue LED may drop around 3 to 3.3 volts. across an LED is approximately constant over a wide range but can vary from LED to LED.</p>
<p>LEDs are diodes and have a</p>
