{"id":21853569,"url":"https://github.com/lupin3000/micropython-i2c-gr10_30","last_synced_at":"2026-04-17T08:02:01.280Z","repository":{"id":219477768,"uuid":"746217386","full_name":"Lupin3000/Micropython-I2C-GR10_30","owner":"Lupin3000","description":"MicroPython I2C library and example for Gravity: GR10-30 Gesture Sensor","archived":false,"fork":false,"pushed_at":"2024-02-11T12:27:23.000Z","size":89,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-20T06:44:57.988Z","etag":null,"topics":["dfrobot","esp32","gesture-recognition","gravity","i2c","micropython","sensor"],"latest_commit_sha":null,"homepage":"https://softwaretester.info","language":"Python","has_issues":false,"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/Lupin3000.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}},"created_at":"2024-01-21T12:27:04.000Z","updated_at":"2024-11-27T20:47:26.000Z","dependencies_parsed_at":"2024-02-11T13:43:09.346Z","dependency_job_id":null,"html_url":"https://github.com/Lupin3000/Micropython-I2C-GR10_30","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"874e27e178d70d4efa0b684577763e986c8b2ec8"},"previous_names":["lupin3000/micropython-i2c-gr10_30"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Lupin3000/Micropython-I2C-GR10_30","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lupin3000%2FMicropython-I2C-GR10_30","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lupin3000%2FMicropython-I2C-GR10_30/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lupin3000%2FMicropython-I2C-GR10_30/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lupin3000%2FMicropython-I2C-GR10_30/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lupin3000","download_url":"https://codeload.github.com/Lupin3000/Micropython-I2C-GR10_30/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lupin3000%2FMicropython-I2C-GR10_30/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31920518,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"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":["dfrobot","esp32","gesture-recognition","gravity","i2c","micropython","sensor"],"created_at":"2024-11-28T01:25:44.840Z","updated_at":"2026-04-17T08:02:01.232Z","avatar_url":"https://github.com/Lupin3000.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MicroPython I2C library and example for Gravity: GR10-30 Gesture Sensor\n\nThis repository contains the MicroPython I2C library for the Gravity: GR10-30 Gesture Sensor from DFRobot, as well as a very simple example of how to use it. The original repository from DFRobot is located [here](https://github.com/cdjq/DFRobot_GR10_30) (_for Arduino and Raspberry Pi_).\n\n## Why this repository?\n\nThe original version of DFRobot uses Python serial (_UART_) and Python SMBus (_I2C_), which are not compatible with MicroPython. Also, I was not so happy with the Python code style/quality. That's why I created this version.\n\n## Prerequisite\n\n- [Gravity: GR10-30 Gesture Sensor](https://www.dfrobot.com/product-2666.html?tracking=Mszf2HlGMStAAKkFfhNgg3QhFFchlilhR47u9vXX9o9Ko6giJYRJQdmwZjbDIvMV)\n- ESP32 (_MicroPython compatible device_)\n- MicroPython firmware installed (_min. 1.20.0.*_)\n- USB cable (_for connection between ESP32 and sensor_)\n- latest [VCP](https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?tab=downloads) driver installed\n\n![GR10_30.jpg](img/GR10_30.jpg)\n\n## Installation\n\nClone this repository to your local computer.\n\n```shell\n# clone repository\n$ git clone https://github.com/Lupin3000/Micropython-I2C-GR10_30.git\n\n# change into local repository folder\n$ cd Micropython-I2C-GR10_30/\n```\n\nYou can optionally install other helpful Python packages.\n\n- esptool (_to flash the MicroPython firmware to the ESP32_)\n- rshell (_to establish a serial connection between the local computer and the ESP32 and to transfer data_)\n- micropython-esp32-stubs (_to facilitate local development, for example: code completion_)\n\n```shell\n# install python packages (optional)\n$ pip install -r requirements.txt\n```\n\nConnect the sensor to the ESP32. Make sure that you have set the communication mode on the sensor to I2C and use the correct connections (_ESP GPIO's/Sensor interface_)! Only then connect the ESP32 to your local computer via USB.\n\n\u003e In the example `main.py`, the GPIOs pins 21 (_SDA_) and 22 (_SCL_) are used. However, you can adapt these to your needs at any time.\n\nThen start the serial connection and load the example and the library onto the ESP32 device.\n\n```shell\n# start rshell connection\n$ rshell -p /dev/cu.usbserial-0001\n\n# upload files and folder\n/YOUR/LOCAL/PATH\u003e cp main.py /pyboard/\n/YOUR/LOCAL/PATH\u003e cp -r lib/ /pyboard/\n```\n\n\u003e The example device/path `/dev/cu.usbserial-0001` could be different for you! Please adapt before your execute the commands!\n\n## Usage\n\n```shell\n# start the Python REPL\n/YOUR/LOCAL/PATH\u003e repl\n```\n\nNow press the keys `CTRL` + `d` on your local device, to trigger the soft-reset of the ESP32. If there are no errors, you should see the string \"Start hand gestures:\" in the terminal after a very short time.\n\n```python\nEntering REPL. Use Control-X to exit.\n\u003e\nMicroPython v1.20.0 on 2023-04-26; ESP32 module with ESP32\nType \"help()\" for more information.\n\u003e\u003e\u003e \n\u003e\u003e\u003e \nMPY: soft reboot\nSensor initialized\nStart hand gestures:\n```\n\nNow move your hand or just fingers in front of the sensor. Here few examples:\n\n```python\nGesture: 4 left\nGesture: 8 right\nGesture: 1 up\nGesture: 2 down\nGesture: 32768 counter clockwise continues\nGesture: 32768 counter clockwise continues\nGesture: 16384 clockwise continues\nGesture: 16384 clockwise continues\n```\n\nAdditional information:\n\n- [DFRobot: Product Wiki](https://wiki.dfrobot.com/SKU_SEN0561_Gravity_GR10_30_Gesture_Sensor)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flupin3000%2Fmicropython-i2c-gr10_30","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flupin3000%2Fmicropython-i2c-gr10_30","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flupin3000%2Fmicropython-i2c-gr10_30/lists"}