Where to add a power on/off switch to an ESP32 board with battery

Look at your 2 position switch as an "or" switch.
Centre pin connects to your battery positive and the remaining outer pins connect to either the charger, OR, to your uC.

1 Like