ringbit remote controlled car

bouton A+B pour avancer
bouton A seul pour tourner à gauche
bouton B seul pour tourner à droite
This commit is contained in:
Jérémie DUCASTEL
2020-07-12 21:30:59 +02:00
parent 40bf11cd7c
commit 9f0cf3fece
2 changed files with 82 additions and 0 deletions

16
ringbit_controller.py Normal file
View File

@ -0,0 +1,16 @@
# emetteur radio microbit
from microbit import *
import radio
radio.config(channel=77)
radio.on()
display.scroll('on')
while True:
if button_a.is_pressed() and button_b.is_pressed():
radio.send('go')
elif button_a.is_pressed():
radio.send('left')
elif button_b.is_pressed():
radio.send('right')