badger2040
badger2040 copied to clipboard
Badger_OS v0.0.4 does not recognize 'WL_GPIO2' on Badger2040W
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