Advertisement
KRITSADA

micro:bit Radio microPython Example

Sep 24th, 2017
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. from microbit import *
  2.  
  3. radio.on()
  4.  
  5. while True:
  6.   if radio.receive():
  7.     display.show(image.DUCK)
  8.   if accelerometer.was_gesture('shake'):
  9.     radio.send('duck')
  10.   sleep(20)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement