Badger 2040 -blinking LED... (!)

I think the Badger 2040 (not W) needs some software updating…

The Badger 2040 isn’t part of the regular Pimoroni Micropython builinds:
From the “Getting Started” we’re sent to: https://github.com/pimoroni/badger2040
and the latest releases (currently 0.0.2 from March).

The Badger OS version demo works fine, but for both the ‘wtih-badger-OS’ and without, the blink LED demo in “Getting Started” does not work:
that is:
import badger2040
badger = badger2040.Badger2040()
badger.led(255)
Let’s turn off the LED again, to be tidy!
badger.led(0)
either as script or in command line quits without blinking and without error.

This is not a hardware problem, as the ‘old way’ works fine:
from machine import Pin
led = Pin(25, Pin.OUT)
led.toggle()

Checking the Micropython version:
print(uos.uname())
(sysname=‘rp2’, nodename=‘rp2’, release=‘1.19.1’, version=‘38e7b84-dirty on 2023-03-30 (GNU 9.2.1 MinSizeRel)’, machine=‘Pimoroni Badger2040 2MB with RP2040’)

This is pretty old; has the structure of the function calls changed, perhaps with the introduction of the Badger W?

It’s all hands on deck dealing with Raspberry Pi orders at the moment, but I’ll check this out when I get a second!

Yes, I think MicroPython version naming structure has changed in recent versions, so the screenshot could probably do with an update.

Just got a chance to check this out - looks like the LED constant in the firmware was wrong for Badger 2040 (but correct for Badger 2040 W, which confused me for a while!).

I’ve fixed it so it should be included when we next do a release, but if you’d like to download a fixed version of MicroPython in the meantime you can do that from the link below:

I think you’ll need to be logged into Github for the download links to be clickable.

Thanks @hel ; everything’s coming up roses now.
print(uos.uname())
now shows release=‘1.20.0’ as well. Sweet.

1 Like