{"id":15142138,"url":"https://github.com/todbot/circuitpython_gc9a01_demos","last_synced_at":"2025-04-12T12:24:26.760Z","repository":{"id":63214585,"uuid":"344330664","full_name":"todbot/CircuitPython_GC9A01_demos","owner":"todbot","description":"Demos showing how to use CircuitPython displayio driver for GC9A01 round LCDs","archived":false,"fork":false,"pushed_at":"2024-09-23T18:23:55.000Z","size":4534,"stargazers_count":64,"open_issues_count":1,"forks_count":16,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-11T18:12:03.586Z","etag":null,"topics":["circuitpython","displayio","gc9a01"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/todbot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-03-04T02:53:58.000Z","updated_at":"2025-04-05T19:42:39.000Z","dependencies_parsed_at":"2025-01-15T18:19:04.742Z","dependency_job_id":"e47106cd-b00d-4f70-a32b-316bf4868714","html_url":"https://github.com/todbot/CircuitPython_GC9A01_demos","commit_stats":{"total_commits":36,"total_committers":3,"mean_commits":12.0,"dds":0.08333333333333337,"last_synced_commit":"e7acde54a485c966e5dad2b30d92b29caa05dbaa"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todbot%2FCircuitPython_GC9A01_demos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todbot%2FCircuitPython_GC9A01_demos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todbot%2FCircuitPython_GC9A01_demos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/todbot%2FCircuitPython_GC9A01_demos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/todbot","download_url":"https://codeload.github.com/todbot/CircuitPython_GC9A01_demos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248565613,"owners_count":21125530,"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":["circuitpython","displayio","gc9a01"],"created_at":"2024-09-26T09:23:29.161Z","updated_at":"2025-04-12T12:24:26.739Z","avatar_url":"https://github.com/todbot.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CircuitPython GC9A01 demos\n\nDemos showing how to use [CircuitPython displayio driver](https://github.com/tylercrumpton/CircuitPython_GC9A01) for GC9A01-based round LCDs.  This driver is available in the [CircuitPython Community Bundle](https://github.com/adafruit/CircuitPython_Community_Bundle), or you can install it by hand by copying the `gc9a01.py` file to your `CIRCUITPY/lib` directory, or use `circup install gc9a01`.\n\n\u003cimg width=325 src=\"./docs/gc9a01_demo1.jpg\" /\u003e\n\u003cimg width=325 src=\"./docs/gc9a01_demo2.jpg\" /\u003e\n\n## Usage\n\n```py\nimport board\nimport busio\nimport fourwire\nimport displayio\nimport gc9a01\ndisplayio.release_displays()\n# Raspberry Pi Pico pinout, one possibility, at \"southwest\" of board\ntft_clk = board.GP10 # must be a SPI CLK\ntft_mosi= board.GP11 # must be a SPI TX\ntft_rst = board.GP12\ntft_dc  = board.GP13\ntft_cs  = board.GP14  # optional, can be \"None\"\ntft_bl  = board.GP15  # optional, can be \"None\"\nspi = busio.SPI(clock=tft_clk, MOSI=tft_mosi)\ndisplay_bus = fourwire.FourWire(spi, command=tft_dc, chip_select=tft_cs, reset=tft_rst)\ndisplay = gc9a01.GC9A01(display_bus, width=240, height=240, backlight_pin=tft_bl)\n\n# ... normal circuitpython displayio stuff\n```\n\n## Installation\n\nEach of the .py files in \"examples\" is its own demo. Copy one of these to be your CIRCUITPY's \"code.py\", like:\n```\ncp gc9a01_hellocircles.py /Volumes/CIRCUITPY/code.py\n```\n\nYou'll need to install various libraries.  Most notably the `gc9a01` library. You may also\nneed the `adafruit_display_text` and `adafruit_imageload`, depending on the example.\nThe easiest way to install these is from a terminal:\n```\ncircup install gc9a01\ncircup install adafruit_display_text\ncircup install adafruit_imageload\n```\n\n\n## Examples\n\nCheck out the 'examples' directory for complete examples:\n\n- 'gc9a01_helloworld' -- shows one way of doing polar coordinates\n- 'gc9a01_hellocircles' -- similar to above but with floating circles using `vectorio`\n- 'gc9a01_picture_locket' -- display a series of pictures, makes a nice locket if used with a QT Py Haxpress\n- 'gc9a01_gauge_knob' -- round dial gauge using gauge background \u0026 dial bitmaps, showing `bitmaptools.rotozoom`\n\nThe examples attempt to auto-detect the board you're using. The currently detected boards:\n\n- [QT Py M0 Haxpress](https://circuitpython.org/board/qtpy_m0_haxpress/)\n- [QT Py RP2040](https://circuitpython.org/board/adafruit_qtpy_rp2040/)\n- [Raspberry Pi Pico](https://circuitpython.org/board/raspberry_pi_pico/)\n- [ItsyBitsy M4 Express](https://circuitpython.org/board/itsybitsy_m4_express/)\n\n### Eyeballs demos\n\nAdditionally, there are several demos in the \"examples/eyeballs\" directory that use these round displays to make moving eyes.\n\n- 'eyeballs/qteye.py' -- single eyeball (or two eyeballs wired in parallel) on a QT PY RP2040 or similar\n- 'eyeballs/qtpy_person_sensor.py' -- single eyeball that tracks your face, thanks to a Person Sensor module\n- 'eyeballs/gc9a01_lizard_eye.py' -- similar to \"qteye\" but uses a cool lizard eye (thx @DJDevon3!)\n- 'eyeballs/gc9a01_multi_eyeball.py' -- independent multiple eyes usigng a [recompiled CircuitPython](https://todbot.com/blog/2022/05/19/multiple-displays-in-circuitpython-compiling-custom-circuitpython/)\n\n\n## Wiring\n\nWiring is dependent on board you're hooking it up to. The \"SCL\" and \"SDA\" lines need to be\nhooked up to SPI pins \"SCK\" and \"MOSI/TX\". The `gc9a01_helloworld.py` has example wirings for three\ndifferent boards.  Here is an example for the Pico:\n\n- VCC - Pico 3.3V(out)\n- Gnd - Pico Ground\n- SCL - Pico GP10 (SPI1 SCK)\n- SDA - Pico GP11 (SPI1 TX)\n- RES - Pico GP12\n- DC  - Pico GP13\n- CS  - Pico GP14\n- BLK - Pico GP15 (can be omitted if you don't need backlight brightness control)\n\n\u003cimg width=500 src=\"./docs/gc9a01_pico_wiring1.jpg\" /\u003e\n\n\nHere is an example for a QT Py Haxpress:\n\n- VCC - QT Py 3.3V\n- Gnd - QT Py Ground\n- SCL - QT Py SCK\n- SDA - QT Py MO\n- RES - QT Py TX\n- DC  - QT Py A3\n- CS  - QT Py A2\n- BLK - unconnected\n\n\u003cimg width=500 src=\"./docs/gc9a01_qtpy_wiring1.jpg\" /\u003e\n\n\n\n## Building your own dial gauges\n\nThere is a partial Python port of [@bikerglen's gauge-generator](https://github.com/bikerglen/round-lcd-gauges/tree/main/gauge-generator) in [`docs/gauge-generator`](./docs/gauge-generator). These scripts use the wonderful [Wand](https://docs.wand-py.org/en/0.6.6/) Python wrapper for ImageMagick's C API.\n\n\n## Future Project Ideas:\n- bargraph display using vectorio\n\n\n\n### Notes to self:\n\n- This repo started out as a GC9A01 driver for CircuitPython, but [@tylercrumpton](https://github.com/tylercrumpton/CircuitPython_GC9A01) beat me to the [CircuitPython Community Bundle](https://github.com/adafruit/CircuitPython_Community_Bundle) by a few days. Now it's a repo of demos\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftodbot%2Fcircuitpython_gc9a01_demos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftodbot%2Fcircuitpython_gc9a01_demos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftodbot%2Fcircuitpython_gc9a01_demos/lists"}