microbit-foundation / micropython-microbit-v2

Temporary home for MicroPython for micro:bit v2 as we stablise it before pushing upstream
MIT License
41 stars 22 forks source link

Button B pin11 digital read always returns 0 #136

Closed microbit-carlos closed 1 year ago

microbit-carlos commented 1 year ago

Button B is pin 11, when pin11.read_digital() is executed, it always returns 0.

For a simple replicator, you can see how pressing button A changes pin5 value, but pin11 is always low:

from microbit import *

while True:
    print(pin5.read_digital(), pin11.read_digital())
    sleep(150)

This works fine on a V1.

dpgeorge commented 1 year ago

pin11 was accidentally defined to be pin 12. Fixed by 1955adb1d9bf0afb8020d375fb63c4c21afc2335