Got my badger yesterday and loving it so far but a couple of oddities that’s confusing me. First on battery power (2 x AAA’s in Pimoroni battery box) it’s very difficult to reset. I have tried reset plus a front panel button as advised but it seems a very randon, most times I can bel; licklijmg buttons for a while before it will reset? Reset works fine on USB and if I disconnect USB once its reset I can press buttons and access functions fine so battery is working.
The other is the battery indicator, it shows the battery symbol with a line through it, I have added launcher.py and made the voltage adjustments.
I added some suggested values for 2xAAA as comments in the code in battery.py in a recent pull request. As @hel mentioned, it might be worth running it connected to USB and with the battery power on, to see the values coming in on the terminal, to give you a sense of what the power actually is. It seems to be working for me now.
Since the introduction of the most recent battery saving code, Badger spends most of its time turned off and the launcher mostly doesn’t stay awake long enough to get a stable voltage reading from the battery. The good news is that batteries last for absolutely ages now though - don’t think I’ve had to charge mine up since!
Hi @hel,
I edited a copy of launcher.py to change the battery voltages to 3.4/3.0 as suggested.
I saved it as mylauncher.py and loaded it to the badger root directory.
I edited main.py to import mylauncher
This works fine when I start Badger by running main.py from Thonny (i.e on USB) and displays the battery lindication nicely.
The clock app even displays the correct time.
When I return to the launcher though, the battery indicator is no longer working and the system freezes.
If I restart the Badger without USB, the battery indicator does not work and the clock defaults to 2022/2/28.
I just tried using import mylauncher to point to a mylauncher.py and it it seems to be working OK for me? Check there’s no underscore in import mylauncher maybe? (the underscore tells Badger to use the copy of the launcher that’s built into the file system).
Badger doesn’t have an onboard RTC, so won’t be able to keep track of the time when it’s powered off. You could add a RTC breakout if you wanted it to save the time? (currently out of stock but I think more are on the way).
We’re working on Badger at the moment for… reasons, so hopefully we should be able to take a look at addressing the battery indicator issue at the same time (there’s more details/discussion about that at the Github issue linked a few posts back).
Hi @hel
It seems to be working now. I think I just needed to hold down the buttons a bit longer. Perhaps worth pointing out in the documentation.
I understand about the RTC (logical), but the clock app is then only really useful as a demo of how to program that type of changing display.
I hope you get the battery display to work properly and look forward to any other improvements you make.
Thanks