Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import radio
- import music
- from microbit import *
- stepcounter=0
- radio.config(group=1)
- while True:
- display.set_pixel(0,0,9)
- message = radio.receive()
- if message:
- display.set_pixel(1,0,9)
- if message=='+1':
- stepcounter+=1
- if message=='you have reached your daily goal':
- music.play(['e','d','e','f'])
- if pin_logo.is_touched():
- display.set_pixel(2,0,9)
- radio.send('short')
- if button_b.is_pressed():
- display.set_pixel(3,0,9)
- radio.send('long')
- if button_a.is_pressed():
- display.set_pixel(4,0,9)
- display.scroll(stepcounter)
- sleep(100)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement