Closed Loop
Closed loop control makes use of the wheel encoders to give feedback on how much the wheel has turned.
import board
import time
from StudioBot import *
drivetrain.straight(100, 0.5) #100cm at 50% power
time.sleep(0.5) #give enough time to apply the brakes 1/2 second
drivetrain.turn(90, 0.1)
time.sleep(0.5)
Last updated