{"id":15170146,"url":"https://github.com/foo-git/gm60_micropython","last_synced_at":"2026-03-08T17:37:48.667Z","repository":{"id":246572784,"uuid":"821501375","full_name":"foo-git/gm60_micropython","owner":"foo-git","description":"Driver for GM60 barcode scanner with MicroPython and ESP32","archived":false,"fork":false,"pushed_at":"2024-07-20T07:53:14.000Z","size":1919,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T21:36:27.142Z","etag":null,"topics":["barcode-scanner","esp32","gm60","grocy","micropython","micropython-esp32"],"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/foo-git.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-06-28T17:26:00.000Z","updated_at":"2024-09-19T11:14:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"8daa14ec-dd25-4b23-b62c-c0db61436b8b","html_url":"https://github.com/foo-git/gm60_micropython","commit_stats":null,"previous_names":["foo-git/gm60_micropython"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foo-git%2Fgm60_micropython","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foo-git%2Fgm60_micropython/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foo-git%2Fgm60_micropython/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foo-git%2Fgm60_micropython/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foo-git","download_url":"https://codeload.github.com/foo-git/gm60_micropython/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242128907,"owners_count":20076277,"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","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":["barcode-scanner","esp32","gm60","grocy","micropython","micropython-esp32"],"created_at":"2024-09-27T08:00:41.772Z","updated_at":"2026-03-08T17:37:48.631Z","avatar_url":"https://github.com/foo-git.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GM60 barcode scanner driver for MicroPython and ESP32\n\n## Background\nTo make the GM60 barcode scanner work with an ESP32 using MicroPython, a driver is needed to handle the input/output to the scanner. The `driver` folder contains this driver, further development resources are located in the `docs` folder.\nThis driver is used in another project for inventory handling using [Grocy](https://grocy.info/), a great software project.\n\n## Features\n* Comfortable I/O commands make working with the datasheet easier\n* CRC support for incoming and outgoing packets\n\n## Example usage\nSee `example.py` for runnable commands.\n\n```\n# Load driver\n\u003e\u003e\u003e from gm60_micropython import GM60_Driver\n\n\n# Initialize UART connection to GM60 barcode scanner\n    # UART port/naming hint:\n    # GM60 RX (green cable) needs to be connected to ESP32 TX (e.g. here pin 25)\n    # GM60 TX (yellow cable) needs to be connected to ESP32 RX (e.g. here pin 26)\n\u003e\u003e\u003e scanner = GM60_Driver(rx=26, tx=25)\n\n\n# Prints hardware and software version information\n\u003e\u003e\u003e scanner.get_version()\n{'hardware': 1.0, 'software_date': '2021-09-16', 'software': 1.08}\n\n\n# Resets scanner back to factory settings\n\u003e\u003e\u003e scanner.reset_to_factory_defaults()\n\n\n# Prints register settings in hexadecimal and binary format for easier development\n\u003e\u003e\u003e scanner.get_register_settings(0x0000)\n(['0x8e'], ['0b10001110'])\n\n\n# Set LED always on\n\u003e\u003e\u003e scanner.set_register_settings(0x0000, 0b10001110)\n\n# Set LED to maximum brightness\n\u003e\u003e\u003e scanner.set_register_settings(0x0015, 0x63)\n\n# Read barcode from sensor\n\u003e\u003e\u003e scanner.read_barcode()\n'4066447241358'\n```\n\n![Circuit diagram for GM60 and ESP32](https://github.com/foo-git/gm60_micropython/blob/main/docs/circuit.png?raw=true)\n\n![Photo of GM60 and ESP32 proof-of-concept build](https://github.com/foo-git/gm60_micropython/blob/main/docs/poc.jpg?raw=true)\n\n## References\nSee `docs/references.md` for other projects using the GM60 barcode scanner. Linked there also is the GM60 datasheet for future reference.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoo-git%2Fgm60_micropython","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoo-git%2Fgm60_micropython","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoo-git%2Fgm60_micropython/lists"}