Turn off WiFi while on Battery, turn on WiFi while powered from USB

Hi, I’m designing a wearable LED thing that I want to be powered by a battery most of the time. While it’s on battery mode, I want the WiFi to be off, to save battery.

I also want to be able to configure the Pixelblaze once via WiFi at the beginning of the day. I’ll be at home, so I can connect it to a different power source (eg USB) instead of the battery. When it’s powered that way, I’d like the WiFi AP to turn on.

How would i go about doing this?

Hi @PurpleMinded ,
There is a setting that will turn WiFi off on power up. It can be turned back on by holding the button down. It’s not automatic, but you could do that when you connect it back up at home.

If you really wanted it automatic, you could wire the button up to something that detected that it wasn’t on battery, then held the button signal low as if you pressed it.