1 A MOSFET is used as an electrically controlled switch to manage higher current LED loads from a low-current signal.
“Think of a MOSFET as a tiny electrically controlled switch. If we put it between the battery and the LEDs, we can turn it on with a signal from the ESP32 and allow power to flow from the battery to the lights.”