badger2040 icon indicating copy to clipboard operation
badger2040 copied to clipboard

Badger_OS v0.0.4 does not recognize 'WL_GPIO2' on Badger2040W

Open Arthur-Philip-Dent opened this issue 8 months ago • 3 comments

Same code from #59 on same Badger2040W with Badger_OS v0.0.4 :

from machine import ADC, I2C, Pin

# reading 'WL_GPIO2' on a picoW tells us whether or not USB power is connected (VBUS Sense)
vbus = Pin("WL_GPIO2", Pin.IN).value()
print(f"vbus: {vbus}")

I personally find this one the more challenging output:

>>> %Run -c $EDITOR_CONTENT

MPY: soft reboot
Traceback (most recent call last):
  File "<stdin>", line 4, in <module>
ValueError: unknown named pin "WL_GPIO2"
>>> 

Did I mess something up or are the releases getting some "winter tuning" lately?

Need a towel?

The Hitchhiker

Arthur-Philip-Dent avatar Nov 03 '23 18:11 Arthur-Philip-Dent