Skip to content

Micropython Gyro calibration #15

Description

@kendmaclean

From FLL Challenge facebook group:
... We run the function below before the start of each run out of base. We ensure a 1/2 second delay from hitting the 'go' button to ensure the robot isn't being touched. ( We aren't geniuses, we googled this issue and came up with the below and tweaked it)

def calibrategs(self):
    debug_print('GS Calibration begin')
    time.sleep(.5)
    for _ in range(2):
        self.gyro.mode = 'GYRO-RATE'
        self.gyro.mode = 'GYRO-ANG'
        time.sleep(.5)
    gsnow = self.gyro.angle
    debug_print('GS Calibration finish ' + str(gsnow))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions