Current state of experiments

This commit is contained in:
Danny Staple
2022-09-05 11:08:03 +01:00
parent d7ba881234
commit df1d67e42d
15 changed files with 91 additions and 660 deletions
+4
View File
@@ -45,6 +45,10 @@ def stop():
def set_speed(motor, speed):
# Swap motor pins if we reverse the speed
if abs(speed) < 0.1:
motor[0].duty_cycle = 0
motor[1].duty_cycle = 1
return
if speed < 0:
direction = motor[1], motor[0]
speed = -speed