Badger 2040 W running Circuitpython wont power on from JST LIPO port

I am running Circuitpython 8.2.10 and I cant get my Badger to start up properly when using a LIPO on the JST battery port. If I press and continue to hold one of the front buttons down it will start and run my code until the button is released and then the unit is immediately off. I have tried countless combinations of pressing multiple buttons along with combinations with the reset button but I can get the Badger to stay on unless I continue to hold any of the front buttons down. Any ideas on how to get this unit to run on the LIPO? Circuitpython code starts and runs perfectly when powered through the micro usb port.

Thank you.

I am also using CP with the Badger2040W and I don’t have any problems. I am not 100% sure that I am using 8.2.10 right now, but I always check the development of CP and I have not seen any major change for the Badger2040W for a long time now (last commit was March 2023).

I usually press a button and count to five (which is shortly after the Pico-W stops blinking), and then it is running fine until I explicitly turn of power using board.ENABLE_DIO.value = 0.

What you could try is to check board.ENABLE_DIO.value in your code. It should be high, because the startup-code of CircuitPython does this (circuitpython/ports/raspberrypi/boards/pimoroni_badger2040w/board.c at 24cdb38be1c77f292550c88a47801bb9d492a8df · adafruit/circuitpython · GitHub). And this should be enough to keep the board alive.

1 Like

Thank you bablokb. I wasnt aware that you could turn on and off the board like this. After reading your post I went through my code (some of which was sample code I downloaded from the internet) and found my buzzkill:

enable.value = False

I remarked out the line that was turning off the board and tried your recommendation of holding a button down for several seconds and I am now running on the LIPO. Thank you for your help.

1 Like