Controlling a light-emitting diode (LED) with an ESP32 Third is the surprisingly simple task, especially when using the 1k resistor. The load limits a current flowing through a LED, preventing them from melting out and ensuring one predictable brightness. Typically, you'll connect a ESP32's GPIO leg to one load, and then connect a resistance to a L