{"id":26871182,"url":"https://github.com/codeadamca/ev3-gyro","last_synced_at":"2026-07-02T06:32:46.745Z","repository":{"id":115327582,"uuid":"281201965","full_name":"codeadamca/ev3-gyro","owner":"codeadamca","description":"A basic example of using Python with the LEGO EV3 gyro sensor.","archived":false,"fork":false,"pushed_at":"2025-01-26T22:17:43.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-30T15:45:39.213Z","etag":null,"topics":["ev3","ev3dev","lego","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeadamca.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-07-20T18:58:33.000Z","updated_at":"2025-09-11T14:03:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"5498f5f4-b584-4645-bb90-e86ae70d872d","html_url":"https://github.com/codeadamca/ev3-gyro","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codeadamca/ev3-gyro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeadamca%2Fev3-gyro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeadamca%2Fev3-gyro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeadamca%2Fev3-gyro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeadamca%2Fev3-gyro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeadamca","download_url":"https://codeload.github.com/codeadamca/ev3-gyro/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeadamca%2Fev3-gyro/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35036551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ev3","ev3dev","lego","python"],"created_at":"2025-03-31T07:18:43.222Z","updated_at":"2026-07-02T06:32:46.722Z","avatar_url":"https://github.com/codeadamca.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LEGO® Mindstorms® EV3 and the Gyro Sensor\n\nA Python snippet utilizing the LEGO EV3 gyro sensor, the LEGO EV3 Brick and [Pybricks](https://pybricks.com/). [Pybricks](https://pybricks.com/) is the LEGO recommended method of using the LEGO EV3 Brick with Python. See the official [Python for EV3](https://education.lego.com/en-us/support/mindstorms-ev3/python-for-ev3) LEGO page for more details. \n\nThis example will change the speed and direction of a motor based on the angle of the gyro sensor.\n\n\u003e The documentation for Pybricks is really helpful:  \n\u003e [https://docs.pybricks.com/en/latest/ev3devices.html](https://docs.pybricks.com/en/latest/ev3devices.html)\n\nOf all the EV3 sensors, the gyro sensor seems to cause the most problems. Here are some issues that I ran into:\n\n## Speed Calibration\nThe gyro sensors calibrates the starting speed when the sensor is plugged into the EV3 brick. If the starting speed is not zero, unplug the gyro sensor from the EV3 brick and then plug it back in. Keep the gyro sensor still when you plug it in to give it a chance to callibrate.\n\n## Angle Calibration\nThe gyro sensors calibrates the starting angle when the sensor is plugged into the EV3 brick. However, the angle can be reset using the reset_angle method. In this script the angle is reset chortly after the beep. Make sure the sensor is positioned at zero when you start the script.\n\n## Rotation\nThe rotation is based on the diagram on the EV3 gyro sensor. The red dot is the center of the rotation. Clockwise is positive and counter-clockwise is negative. If desired, this can be switched when initializing the gyro sensor. \n\n---\n\n## Repo Resources\n\n- [Pybricks](https://pybricks.com/)\n- [Python for EV3](https://education.lego.com/en-us/support/mindstorms-ev3/python-for-ev3)\n\n\u003cbr\u003e\n\u003ca href=\"https://codeadam.ca\"\u003e\n\u003cimg src=\"https://cdn.codeadam.ca/images@1.0.0/codeadam-logo-coloured-horizontal.png\" width=\"200\"\u003e\n\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeadamca%2Fev3-gyro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeadamca%2Fev3-gyro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeadamca%2Fev3-gyro/lists"}