I’ve written a bit of code for a brand new Badger 2040 W, it all works as expected, but I can’t get the sleep_for() function to work.
I’ve cut the code down to the bare minimum
import badger2040 badger = badger2040.Badger2040() badger.sleep_for(1)
The error returned is
MPY: soft reboot Traceback (most recent call last): File "<stdin>", line 3, in <module> File "badger2040.py", line 171, in __getattr__ AttributeError: 'picographics' object has no attribute 'sleep_for'
The fuller code can connect to wifi, update the screen, turn the LED on and off etc without issue.
I’ve flashed my badger with the latest firmware for the Badger W (also tried without badger os) - https://github.com/pimoroni/badger2040/releases/download/v0.0.3/pimoroni-badger2040w-v0.0.3-micropython-with-badger-os.uf2
I’m using Thonny 4.1.1 to run the code on a windows 10 PC. Have also tried running the code saved as main.py when connected to a battery supplying 4v.