reading Microsoft microbit arcade buttons in mu python

Hi, I’m trying to get a arcade button to connect with mu python version 1.2.0 but i can get it to work

Here is the code so far:

from microbit import *

while True:
if pin0.read_digital():
display.show(Image.HAPPY)
else:
display.show(Image.SAD)

The code wont run and I don’t know how to fix it. Any ideas

(FYI: I’m using Mu instead of micro bit arcade because the imbedded if statements i need for the future don’t work)

1 Like