Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import utime
- import hub
- from hub import port
- port.A.mode(port.MODE_FULL_DUPLEX)
- a=port.A
- a.baud(115200)
- i=0
- while True:
- utime.sleep_ms(150)
- p=hub.button.center.was_pressed()
- if p==True:
- i=i+1
- hub.display.show(i)
- print("Send: " + str(i))
- a.write(str(i))
- if i==9:
- i=0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement