main
PaolaSilvestre21 2023-12-31 21:46:28 -03:00
commit 321a018177
1 changed files with 42 additions and 0 deletions

42
iota.py 100644
View File

@ -0,0 +1,42 @@
import radio
from microbit import display, Image, sleep
stop = Image("09990:"
"90009:"
"90009:"
"90009:"
"09990")
danger = Image("90909:"
"90909:"
"90909:"
"00000:"
"90909")
left = Image("00900:"
"09000:"
"99999:"
"09000:"
"00900")
right = Image("00900:"
"00090:"
"99999:"
"00090:"
"00900")
radio.on()
while True:
incoming = radio.receive()
if incoming == 'left':
display.show(left)
sleep(500)
elif incoming == 'right':
display.show(right)
sleep(500)
elif incoming == 'stop':
display.show(stop)
sleep(500)
else:
display.show(Image.HEART)