mirror of
https://github.com/alankrantas/microbit-micropython-cookbook.git
synced 2025-12-15 17:40:49 +01:00
Update rc_car.py
This commit is contained in:
@@ -19,7 +19,7 @@ motor_right_B.write_digital(0)
|
||||
motor_left_A.write_digital(0)
|
||||
motor_left_B.write_digital(0)
|
||||
|
||||
display.show(Image.SQUARE)
|
||||
display.show(Image.HAPPY)
|
||||
|
||||
while True:
|
||||
direction = radio.receive()
|
||||
@@ -51,7 +51,7 @@ while True:
|
||||
motor_left_A.write_digital(0)
|
||||
motor_left_B.write_analog(SPEED)
|
||||
else:
|
||||
display.show(Image.SQUARE)
|
||||
display.show(Image.HAPPY)
|
||||
motor_right_A.write_digital(0)
|
||||
motor_right_B.write_digital(0)
|
||||
motor_left_A.write_digital(0)
|
||||
|
||||
Reference in New Issue
Block a user