Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Micropython Gyro calibration #15

Open
kendmaclean opened this issue Jan 20, 2021 · 1 comment
Open

Micropython Gyro calibration #15

kendmaclean opened this issue Jan 20, 2021 · 1 comment

Comments

@kendmaclean
Copy link
Contributor

kendmaclean commented Jan 20, 2021

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))
@kendmaclean
Copy link
Contributor Author

This looks more like EV3DEV python than official Lego Micropython...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant