Ch-5 clean
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import time
|
||||
import robot
|
||||
|
||||
max_speed = 2**16-1
|
||||
max_speed = 2 ** 16 - 1
|
||||
|
||||
robot.motor_A1.duty_cycle = int(0.8 * max_speed)
|
||||
time.sleep(0.3)
|
||||
robot.stop()
|
||||
robot.stop()
|
||||
|
||||
@@ -4,8 +4,8 @@ import pwmio
|
||||
|
||||
A1_PWM = pwmio.PWMOut(board.GP17)
|
||||
|
||||
A1_PWM.duty_cycle = 2**16-1
|
||||
A1_PWM.duty_cycle = 2 ** 16 - 1
|
||||
time.sleep(0.3)
|
||||
A1_PWM.duty_cycle = 2**15
|
||||
A1_PWM.duty_cycle = 2 ** 15
|
||||
time.sleep(0.3)
|
||||
A1_PWM.duty_cycle = 0
|
||||
|
||||
@@ -3,8 +3,8 @@ import robot
|
||||
|
||||
try:
|
||||
for speed in range(5, 10):
|
||||
robot.set_left(speed/10)
|
||||
robot.set_right(speed/10)
|
||||
robot.set_left(speed / 10)
|
||||
robot.set_right(speed / 10)
|
||||
time.sleep(0.3)
|
||||
finally:
|
||||
robot.stop()
|
||||
|
||||
Reference in New Issue
Block a user