pimoroni / badger2040

Examples and firmware for Badger 2040 and Badger 2040 W
MIT License
165 stars 53 forks source link

Badger 2040W: Not waking from halt with button press #69

Open tti0 opened 11 months ago

tti0 commented 11 months ago

Hi!

I am experiencing an issue whereby on the Badger 2040 W, when the halt() method is called, the device does not restart main.py upon a subsequent front button press, as expected in the documentation.

To demonstrate, I have the following program as main.py, with firmware v. 0.0.4:

import badger2040
import time

badger = badger2040.Badger2040()
badger.led(255)
time.sleep(1)
badger.led(0)
badger.halt()

When USB is connected, the LED blinks, as expected. Pressing any of the buttons on the front of the device does not cause the LED to blink again, so I suspect that main.py is not being started on wake up. However, when connected to Thonny, pressing any of the front buttons causes a new REPL prompt to appear (>>>), so the Badger does seem to wake up.

I'd be grateful for any help with this, please.

Thank you!