{"id":21853564,"url":"https://github.com/lupin3000/micropython-i2c-df2301q","last_synced_at":"2026-05-09T06:06:47.488Z","repository":{"id":215935774,"uuid":"740079477","full_name":"Lupin3000/Micropython-I2C-DF2301Q","owner":"Lupin3000","description":"MicroPython I2C library and example for Gravity: Offline Language Learning Voice Recognition Sensor","archived":false,"fork":false,"pushed_at":"2024-03-01T09:12:38.000Z","size":103,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T18:52:04.512Z","etag":null,"topics":["ai","dfrobot","esp32","gravity","i2c","micropython","offline","sensor","voice-recognition"],"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,"publiccode":null,"codemeta":null}},"created_at":"2024-01-07T13:18:12.000Z","updated_at":"2024-02-13T17:05:13.000Z","dependencies_parsed_at":"2024-11-28T01:27:38.726Z","dependency_job_id":"5642a06c-f319-4e39-9774-52d412344d7d","html_url":"https://github.com/Lupin3000/Micropython-I2C-DF2301Q","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"c0a78cf2e0c8f8c7dc3db74bc4487e5331ce01df"},"previous_names":["lupin3000/micropython-i2c-df2301q"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Lupin3000/Micropython-I2C-DF2301Q","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lupin3000%2FMicropython-I2C-DF2301Q","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lupin3000%2FMicropython-I2C-DF2301Q/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lupin3000%2FMicropython-I2C-DF2301Q/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lupin3000%2FMicropython-I2C-DF2301Q/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lupin3000","download_url":"https://codeload.github.com/Lupin3000/Micropython-I2C-DF2301Q/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lupin3000%2FMicropython-I2C-DF2301Q/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267842944,"owners_count":24153131,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"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":["ai","dfrobot","esp32","gravity","i2c","micropython","offline","sensor","voice-recognition"],"created_at":"2024-11-28T01:25:43.106Z","updated_at":"2026-05-09T06:06:42.448Z","avatar_url":"https://github.com/Lupin3000.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MicroPython I2C library and example for Gravity: Offline Language Learning Voice Recognition Sensor\n\nThis repository contains the MicroPython I2C library for the Gravity: Offline Language Learning Voice Recognition 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/DFRobot/DFRobot_DF2301Q) (_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: Offline Language Learning Voice Recognition Sensor](https://www.dfrobot.com/product-2665.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![DF2301Q.jpg](img/DF2301Q.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-DF2301Q.git\n\n# change into local repository folder\n$ cd Micropython-I2C-DF2301Q/\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 \"Speak your commands:\" 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\nSpeak your commands:\n```\n\nNow speak the wake-up word and few commands. Here few examples:\n\n```python\nCOMMAND ID: 2\nCOMMAND ID: 49\nCOMMAND ID: 84\n```\n\nAdditional information:\n\n- [DFRobot: Product Wiki](https://wiki.dfrobot.com/SKU_SEN0539-EN_Gravity_Voice_Recognition_Module_I2C_UART)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flupin3000%2Fmicropython-i2c-df2301q","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flupin3000%2Fmicropython-i2c-df2301q","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flupin3000%2Fmicropython-i2c-df2301q/lists"}