Created
September 20, 2020 14:57
-
-
Save jkutner/66084c50013a76e5cbade4edf94f2c67 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def gyro_drive(self, speed, heading, distance): | |
self.robot.reset() | |
actual_distance = 0 | |
while actual_distance < distance: | |
correction = self.gyro.angle() * -10 | |
self.robot.drive(speed, correction) | |
wait(10) | |
actual_distance = self.robot.distance() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment