{"id":15018604,"url":"https://github.com/adafruit/adafruit_circuitpython_rgb_display","last_synced_at":"2025-04-08T04:11:34.393Z","repository":{"id":37602120,"uuid":"76310244","full_name":"adafruit/Adafruit_CircuitPython_RGB_Display","owner":"adafruit","description":"Drivers for RGB displays for Adafruit CircuitPython.","archived":false,"fork":false,"pushed_at":"2025-02-10T22:26:36.000Z","size":320,"stargazers_count":133,"open_issues_count":13,"forks_count":54,"subscribers_count":26,"default_branch":"main","last_synced_at":"2025-04-08T04:11:22.946Z","etag":null,"topics":["circuitpython","hacktoberfest"],"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/adafruit.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2016-12-13T01:17:14.000Z","updated_at":"2025-03-18T14:49:57.000Z","dependencies_parsed_at":"2023-02-19T09:55:18.935Z","dependency_job_id":"6005d6ee-6f74-4690-b76a-54c0bf23e368","html_url":"https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display","commit_stats":{"total_commits":210,"total_committers":27,"mean_commits":7.777777777777778,"dds":0.7857142857142857,"last_synced_commit":"2c4d380e552a2cd560e36a500f6ac3f51c8085b0"},"previous_names":[],"tags_count":75,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adafruit%2FAdafruit_CircuitPython_RGB_Display","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adafruit%2FAdafruit_CircuitPython_RGB_Display/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adafruit%2FAdafruit_CircuitPython_RGB_Display/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adafruit%2FAdafruit_CircuitPython_RGB_Display/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adafruit","download_url":"https://codeload.github.com/adafruit/Adafruit_CircuitPython_RGB_Display/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247773719,"owners_count":20993639,"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","hacktoberfest"],"created_at":"2024-09-24T19:52:10.522Z","updated_at":"2025-04-08T04:11:34.372Z","avatar_url":"https://github.com/adafruit.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Introduction\n============\n\n.. image:: https://readthedocs.org/projects/adafruit-circuitpython-rgb_display/badge/?version=latest\n    :target: https://docs.circuitpython.org/projects/rgb_display/en/latest/\n    :alt: Documentation Status\n\n.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg\n    :target: https://adafru.it/discord\n    :alt: Discord\n\n.. image:: https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display/workflows/Build%20CI/badge.svg\n    :target: https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display/actions/\n    :alt: Build Status\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :target: https://github.com/psf/black\n    :alt: Code Style: Black\n\nPort of display drivers from https://github.com/adafruit/micropython-adafruit-rgb-display to Adafruit CircuitPython for use on Adafruit's SAMD21-based and other CircuitPython boards.\n\n.. note:: This driver currently won't work on micropython.org firmware, instead you want the micropython-adafruit-rgb-display driver linked above!\n\nThis CircuitPython driver currently supports displays that use the following display-driver chips: HX8353, HX8357, ILI9341, S6D02A1, ST7789, SSD1331, SSD1351, and ST7735 (including variants ST7735R and ST7735S).\n\nDependencies\n=============\nThis driver depends on:\n\n* `Adafruit CircuitPython \u003chttps://github.com/adafruit/circuitpython\u003e`_\n* `Bus Device \u003chttps://github.com/adafruit/Adafruit_CircuitPython_BusDevice\u003e`_\n\nPlease ensure all dependencies are available on the CircuitPython filesystem.\nThis is easily achieved by downloading\n`the Adafruit library and driver bundle \u003chttps://github.com/adafruit/Adafruit_CircuitPython_Bundle\u003e`_.\n\nFor the Pillow Examples, you will need to be running CPython. This means using a Single Board Computer\nsuch as a Raspberry Pi or using a chip such as an FT232H on Linux, Window, or Mac. CircuitPython does\nnot support PIL/pillow (python imaging library)!\n\nFor improved performance consider installing NumPy.\n\nInstalling from PyPI\n====================\n\nOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from\nPyPI \u003chttps://pypi.org/project/adafruit-circuitpython-rgb-display/\u003e`_. To install for current user:\n\n.. code-block:: shell\n\n    pip3 install adafruit-circuitpython-rgb-display\n\nTo install system-wide (this may be required in some cases):\n\n.. code-block:: shell\n\n    sudo pip3 install adafruit-circuitpython-rgb-display\n\nTo install in a virtual environment in your current project:\n\n.. code-block:: shell\n\n    mkdir project-name \u0026\u0026 cd project-name\n    python3 -m venv .venv\n    source .venv/bin/activate\n    pip3 install adafruit-circuitpython-rgb-display\n\nUsage Example\n=============\n\n2.2\", 2.4\", 2.8\", 3.2\" TFT\n---------------------------\n\n.. code-block:: python\n\n  import time\n  import busio\n  import digitalio\n  from board import SCK, MOSI, MISO, D2, D3\n\n  from adafruit_rgb_display import color565\n  import adafruit_rgb_display.ili9341 as ili9341\n\n\n  # Configuration for CS and DC pins:\n  CS_PIN = D2\n  DC_PIN = D3\n\n  # Setup SPI bus using hardware SPI:\n  spi = busio.SPI(clock=SCK, MOSI=MOSI, MISO=MISO)\n\n  # Create the ILI9341 display:\n  display = ili9341.ILI9341(spi, cs=digitalio.DigitalInOut(CS_PIN),\n                            dc=digitalio.DigitalInOut(DC_PIN))\n\n  # Main loop:\n  while True:\n      # Clear the display\n      display.fill(0)\n      # Draw a red pixel in the center.\n      display.pixel(120, 160, color565(255, 0, 0))\n      # Pause 2 seconds.\n      time.sleep(2)\n      # Clear the screen blue.\n      display.fill(color565(0, 0, 255))\n      # Pause 2 seconds.\n      time.sleep(2)\n\n\n1.14\" TFT with Raspbery Pi 4\n-----------------------------\n\nWith 1.14\" `wiring \u003chttps://learn.adafruit.com/adafruit-1-14-240x135-color-tft-breakout/python-wiring-and-setup\u003e`_, here is the working code:\n\n.. code-block:: python\n\n  import time\n  import busio\n  import digitalio\n  from board import SCK, MOSI, MISO, CE0, D24, D25\n\n  from adafruit_rgb_display import color565\n  from adafruit_rgb_display.st7789 import ST7789\n\n\n  # Configuration for CS and DC pins:\n  CS_PIN = CE0\n  DC_PIN = D25\n  RESET_PIN = D24\n  BAUDRATE = 24000000\n\n  # Setup SPI bus using hardware SPI:\n  spi = busio.SPI(clock=SCK, MOSI=MOSI, MISO=MISO)\n\n  # Create the ST7789 display:\n  display = ST7789(\n      spi,\n      rotation=90,\n      width=135,\n      height=240,\n      x_offset=53,\n      y_offset=40,\n      baudrate=BAUDRATE,\n      cs=digitalio.DigitalInOut(CS_PIN),\n      dc=digitalio.DigitalInOut(DC_PIN),\n      rst=digitalio.DigitalInOut(RESET_PIN))\n\n  # Main loop: same as above\n  while True:\n      # Clear the display\n      display.fill(0)\n      # Draw a red pixel in the center.\n      display.pixel(120, 160, color565(255, 0, 0))\n      # Pause 2 seconds.\n      time.sleep(2)\n      # Clear the screen blue.\n      display.fill(color565(0, 0, 255))\n      # Pause 2 seconds.\n      time.sleep(2)\n\n\nDocumentation\n=============\n\nAPI documentation for this library can be found on `Read the Docs \u003chttps://docs.circuitpython.org/projects/rgb_display/en/latest/\u003e`_.\n\nFor information on building library documentation, please check out `this guide \u003chttps://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1\u003e`_.\n\nContributing\n============\n\nContributions are welcome! Please read our `Code of Conduct\n\u003chttps://github.com/adafruit/Adafruit_CircuitPython_RGB_Display/blob/main/CODE_OF_CONDUCT.md\u003e`_\nbefore contributing to help this project stay welcoming.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadafruit%2Fadafruit_circuitpython_rgb_display","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadafruit%2Fadafruit_circuitpython_rgb_display","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadafruit%2Fadafruit_circuitpython_rgb_display/lists"}