#FeatherS2 battery help
1 messages · Page 1 of 1 (latest)
There are 3 other pins in use... LDO1 3.3v, ground, and GPIO17 to power/read a motion sensor
What is your program supposed to do?
At the moment its just proof that it works via battery - it connects to wifi then it turns on the led and reads the state of the motion sensor and ambient light sensor every 500ms
all of this works fine with usb-c plugged into the computer
So you are turning on the RGB led in code? And that doesn't happen on the battery ?
correct
the documentation isnt clear but there are two LDO bus - LDO1 handles board operation, ESP32-S2, RAM and Flash
LDO2 handles the onboard LED and not sure what else - it mentions needing to set GPIO21 to control LDO2 - my concern is that LDO2 is off by default when on battery power and maybe I am not turning it back on properly
pinMode(21, OUTPUT);
digitalWrite(21, HIGH);
This is from the manufacturers website:
The second LDO is for you to use to connect external 3V3 modules, sensors and peripherals, and the APA102 RGB LED, and it has programmable EN control tied to GPIO21 + it’s connected to the deep sleep capabilities of the S2, so if the S2 goes into deep sleep, the 2nd LDO is automatically shut down for you!
Yes, I saw that ... catching up on the documentation, since this is not an Adafruit board
Looks like what you're doing is correct.
You could try removing the wifi code, or at least blinking the LED before connecting to the network, just in case the wifi is drawing too much power.
Also, you could try asking in the Unexpected Maker discord https://help.unexpectedmaker.com/, they might be more familiar with common issues.