I would like to connect and power a LED directly by using a GPIO pin of the ESP32 board (I am using the ESP32 NodeMCU WiFi Dev Kit C). As far as I know the GPIO pins provide 3.3V. I found some LEDs with 5V blocking voltage and 2.8V max. supply voltage. If I understand it right, it needs a resistor.
If the max. forward current are 20mA. So the resistors needs to be (3.3V - 2.8V) / 0.02mA = 25 ohm, is that right?
Is there a way to use a built-in resistor so that I do not need to add a resistor? Or how can I connect a resistor so that I can also connect the LED directly to the GPIO pin? What is the recommended way? I only worked with breadboards.
Thanks in advance.