mirror of
https://github.com/alankrantas/microbit-micropython-cookbook.git
synced 2025-12-16 10:00:37 +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_A.write_digital(0)
|
||||||
motor_left_B.write_digital(0)
|
motor_left_B.write_digital(0)
|
||||||
|
|
||||||
display.show(Image.SQUARE)
|
display.show(Image.HAPPY)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
direction = radio.receive()
|
direction = radio.receive()
|
||||||
@@ -51,7 +51,7 @@ while True:
|
|||||||
motor_left_A.write_digital(0)
|
motor_left_A.write_digital(0)
|
||||||
motor_left_B.write_analog(SPEED)
|
motor_left_B.write_analog(SPEED)
|
||||||
else:
|
else:
|
||||||
display.show(Image.SQUARE)
|
display.show(Image.HAPPY)
|
||||||
motor_right_A.write_digital(0)
|
motor_right_A.write_digital(0)
|
||||||
motor_right_B.write_digital(0)
|
motor_right_B.write_digital(0)
|
||||||
motor_left_A.write_digital(0)
|
motor_left_A.write_digital(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user