{"id":16237580,"url":"https://github.com/lexus2k/lcdgfx","last_synced_at":"2026-04-04T11:14:20.280Z","repository":{"id":44370616,"uuid":"204888210","full_name":"lexus2k/lcdgfx","owner":"lexus2k","description":"Driver for LCD displays running on Arduino/Avr/ESP32/Linux (including Rasperry) platforms","archived":false,"fork":false,"pushed_at":"2025-03-30T07:46:05.000Z","size":5730,"stargazers_count":408,"open_issues_count":36,"forks_count":57,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-01T05:38:14.693Z","etag":null,"topics":["arduino","arduino-library","arkanoid","atmega328p","attiny","attiny85","esp32","i2c","ili9341","lcd-display","nokia5110","raspberry-pi","sh1106","spi","ssd1306","ssd1325","ssd1327","ssd1331","ssd1351"],"latest_commit_sha":null,"homepage":null,"language":"C++","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/lexus2k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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":"AUTHORS.md","dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"lexus2k","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":["https://etherscan.io/address/0x20608A71470Bc84a3232621819f578Fb9C02A460","https://btc.com/3CtUY6Ag2zsvm1JyqeeKeK8kjdG7Tnjr5W"]}},"created_at":"2019-08-28T08:49:49.000Z","updated_at":"2025-03-30T07:46:09.000Z","dependencies_parsed_at":"2023-02-14T07:45:19.181Z","dependency_job_id":"431342f8-0cb6-4881-9095-4bbadacb86af","html_url":"https://github.com/lexus2k/lcdgfx","commit_stats":{"total_commits":253,"total_committers":10,"mean_commits":25.3,"dds":0.0513833992094862,"last_synced_commit":"15d9fce45d53b70fbdc3b03521f8ba2e8704ca55"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexus2k%2Flcdgfx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexus2k%2Flcdgfx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexus2k%2Flcdgfx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lexus2k%2Flcdgfx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lexus2k","download_url":"https://codeload.github.com/lexus2k/lcdgfx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247801175,"owners_count":20998339,"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":["arduino","arduino-library","arkanoid","atmega328p","attiny","attiny85","esp32","i2c","ili9341","lcd-display","nokia5110","raspberry-pi","sh1106","spi","ssd1306","ssd1325","ssd1327","ssd1331","ssd1351"],"created_at":"2024-10-10T13:36:12.801Z","updated_at":"2026-04-04T11:14:20.231Z","avatar_url":"https://github.com/lexus2k.png","language":"C++","funding_links":["https://ko-fi.com/lexus2k","https://etherscan.io/address/0x20608A71470Bc84a3232621819f578Fb9C02A460","https://btc.com/3CtUY6Ag2zsvm1JyqeeKeK8kjdG7Tnjr5W"],"categories":["C++"],"sub_categories":[],"readme":"# LCDGFX library for display controllers\n\n\u003c!-- [![Build Status](https://circleci.com/gh/lexus2k/lcdgfx.svg?style=svg)](https://circleci.com/gh/lexus2k/lcdgfx) --\u003e\n![Github actions](https://github.com/lexus2k/lcdgfx/actions/workflows/c-cpp.yml/badge.svg)\n[![Coverage Status](https://coveralls.io/repos/github/lexus2k/lcdgfx/badge.svg?branch=master)](https://coveralls.io/github/lexus2k/lcdgfx?branch=master)\n[![Doc Status](.travis/code_documented.svg)](https://codedocs.xyz/lexus2k/lcdgfx)\n![GitHub](https://img.shields.io/github/license/lexus2k/lcdgfx)\n\n\n[tocstart]: # (toc start)\n\n  * [Introduction](#introduction)\n  * [Documentation](#documentation)\n  * [Easy to use](#easy-to-use)\n  * [Key Features](#key-features)\n  * [Setting up](#setting-up)\n  * [Supported displays](#supported-displays)\n  * [Supported platforms](#supported-platforms)\n  * [Useful tools](#useful-tools)\n  * [Projects using lcdgfx](#projects-using-lcdgfx)\n  * [The goals of lcdgfx library](#the-goals-of-ldcgfx-library)\n  * [License](#license)\n  \n[tocend]: # (toc end)\n\n\n## Introduction\n\nlcdgfx driver is C++ library with unicode support. The library can be compiled for plain Linux\n(for example, raspberry spi), or you can use it with plain avr-gcc compiler without Arduino IDE. It supports\nmonochrome and RGB oleds and has debug mode, allowing to execute code on Linux, Windows and macOS, using SDL2.0.\nThe library is intended to run on small microcontrollers. It is developed to use as few resources as possible,\nbut still has powerful capabilities (NanoEngine), allowing to develop nice animation.\nIt works also on any powerful devices like raspberry pi, esp32; and can be easily ported to new platform.\nThis library integrates another library [canvas](https://github.com/lexus2k/canvas)\n\n## Documentation\n\nFor more information about this library, please, visit https://github.com/lexus2k/lcdgfx.\nDocumentation generated by doxygen tool can be found at [codedocs xyz site](https://codedocs.xyz/lexus2k/lcdgfx).\nThe library provides numerous usage [examples](https://github.com/lexus2k/lcdgfx/tree/master/examples).\n\n## Easy to use\n\nExample:\n\n```.cpp\nDisplayST7735_128x160x16_SPI display(3,{-1, 4, 5, 0,-1,-1});\n\nvoid setup()\n{\n    display.begin();\n    display.clear();\n}\n\nvoid loop()\n{\n    display.setColor(RGB_COLOR16(255,255,0));\n    display.drawLine(10,30,56,96);\n}\n```\n\n## Key Features\n\n * Supports color, monochrome OLED displays\n * The library has modular structure, and some modules can be excluded from compilation at all to reduce flash usage.\n * **Very small footprint** ( Draw text example uses only 5KiB of Flash with I2C code, display code, font!!! and application itself.\n   Examples without fonts start at 2.5KiB of Flash )\n * **Very small RAM consumption** ( Attiny85 with Damellis package needs minimum 30 bytes of RAM to communicate with OLED )\n * Fast implementation to provide reasonable speed on slow microcontrollers\n * Supports i2c and spi interfaces, allows to implement custom interfaces:\n   * i2c (software implementation, Wire library, AVR Twi, Linux i2c-dev)\n   * spi (4-wire spi via Arduino SPI library, AVR Spi, AVR USI module)\n * Primitive graphics functions (lines, rectangles, pixels, bitmaps, drawing canvas)\n * Printing text to display (using fonts of different size, [How to add new fonts](https://github.com/lexus2k/lcdgfx/wiki/How-to-create-new-font-for-the-library), [Useful tools](#useful-tools))\n * Includes [graphics engine](https://github.com/lexus2k/lcdgfx/wiki/Using-NanoEngine-for-systems-with-low-resources2) to support\n   double buffering on tiny microcontrollers.\n * Can be used for game development (bonus examples):\n   * Arkanoid game ([arkanoid](examples/games/arkanoid) in old style API and [arkanoid8](examples/games/arkanoid8) in new style API)\n   * Simple [Lode runner](examples/games/lode_runner) game.\n   * [Snowflakes](examples/nano_engine/snowflakes)\n\n![Image of arkanoid intro](imgs/arkanoid.png)\n![Image of lode runner](imgs/lode_runner.gif)\n\n![Image of menu example](imgs/mainmenu_top.png)\n![Image of color oled](imgs/fonts.png)\n\nThe i2c pins can be changed via API functions. Please, refer to documentation. Keep in mind,\nthat the pins, which are allowed for i2c or spi interface, depend on the hardware.\nThe default spi SCLK and MOSI pins are defined by SPI library, and DC, RST, CES pins are configurable\nthrough API.\n\n## Setting up\n\n*i2c Hardware setup is described [here](https://github.com/lexus2k/lcdgfx/wiki/Hardware-setup)*\n\n*Setting up for Arduino from github sources)*\n * Download source from https://github.com/lexus2k/lcdgfx\n * Put the sources to Arduino/libraries/lcdgfx folder\n\n*Setting up for Arduino from Arduino IDE library manager*\n * Install lcdgfx library (named lcdgfx by Alexey Dynda) via Arduino IDE library manager\n\n*Using with plain avr-gcc:*\n * Download source from https://github.com/lexus2k/lcdgfx\n * Build the library (variant 1)\n   * cd lcdgfx/src \u0026\u0026 make -f Makefile.avr MCU=\u003cyour_mcu\u003e\n   * Link library to your project (refer to [Makefile.avr](examples/Makefile.avr) in examples folder).\n * Build demo code (variant 2)\n   * cd lcdgfx/tools \u0026\u0026 ./build_and_run.sh -p avr -m \u003cyour_mcu\u003e ssd1306_demo\n\n *For esp32:*\n  * Download source from https://github.com/lexus2k/lcdgfx\n  * Put downloaded sources to components/lcdgfx/ folder.\n  * Compile your project as described in ESP-IDF build system documentation\n\nFor more information about this library, please, visit https://github.com/lexus2k/lcdgfx.\nDoxygen documentation can be found at [Codedocs xyz site](https://codedocs.xyz/lexus2k/lcdgfx).\nIf you found any problem or have any idea, please, report to Issues section.\n\n## Supported displays:\n\n| **Display** | **I2C** | **SPI** | **Orientation** | **Comments** |\n| :-------- |:---:|:---:|:---:|:---------|\n| sh1106 128x64 | X | X |   |   |\n| sh1107 128x64 | X | X |   |   |\n| sh1107 64x128 | X | X |   |   |\n| ssd1306 64x32, 64x48, 128x64, 128x32 | X | X |   |   |\n| ssd1325 128x64 | X | X |   |   |\n| ssd1327 128x128 | X | X |   |   |\n| ssd1331 96x64 |   | X | X |   |\n| ssd1351 128x128, 96x96 |   | X | X |   |\n| il9163 128x128 |   | X | X | please, don't forget to connect backlight |\n| st7735 128x160, 80x160, 128x128 |   | X | X | please, don't forget to connect backlight |\n| st7789 135x240 |   | X | X | please, don't forget to connect backlight |\n| ili9341 240x320 |   | X | X | please, don't forget to connect backlight |\n| pcd8544 84x48 |   | X  |   | Nokia 5110 |\n| any other custom |  |  |  | Refer to [custom display example](examples/interfaces/custom_display/custom_display.ino) |\n\n## Supported platforms\n\nCompilers: gcc, clang\n\n| **Platforms** | **I2C** | **SPI** | **Comments** |\n| :-------- |:---:|:---:|:---------|\n| **Arduino** |     |     |          |\n| **Wio Terminal** |  X  |  X  | by SeeedStudio     |\n| Attiny85, Attiny45  |  X  |  X  | Refer to [Damellis attiny package](https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json) |\n| Attiny84, Attiny44  |  X  |  X  | Refer to [Damellis attiny package](https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json) |\n| Atmega328p, Atmega168  |  X  |  X  |    |\n| Atmega32u4  |  X  |  X  |    |\n| Atmega2560  |  X  |  X  |    |\n| Digispark, including PRO version  |  X  |  X  |  check [examples compatibility list](examples/Digispark_compatibility.txt)  |\n| ESP8266  |  X  |  X  | check [examples compatibility list](examples/ESP8266_compatibility.txt)   |\n| ESP32  |  X  |  X  | check [examples compatibility list](examples/ESP8266_compatibility.txt)   |\n| STM32  |  X  |  X  | [stm32duino](https://github.com/stm32duino/wiki/wiki)  |\n| Arduino Zero | X  | X  |    |\n| Nordic nRF5 (nRF51, nRF52) | X | X | via Standard Arduino nRF52 boards. nRF users, enable c++11 in platform.txt `-std=gnu++11` |\n| Nordic nRF5 (nRF51, nRF52) | X | X | via [Sandeep Mistry arduino-nRF5](https://github.com/sandeepmistry/arduino-nRF5) package |\n| Wio Terminal |  X |  X  | [Wio Terminal](https://www.seeedstudio.com/Wio-Terminal-p-4509.html)  |\n| TTGO T-Display |   | X  |  [LilyGo TTGO](http://www.lilygo.cn/prod_view.aspx?Id=1126)  |\n| **Plain AVR** |   |     |          |\n| Attiny85, Attiny45 |  X  |  X  |         |\n| Atmega328p, Atmega168 |  X  |  X  |         |\n| Atmega32u4  |  X  |  X  |    |\n| **Plain ESP32 IDF** |   |     |          |\n| ESP32 |  X  | X  |  library can be used as IDF component  |\n| TTGO T-Display |   | X  |     |\n| **Plain ESP8266** |   |     |          |\n| ESP8266 |  X  | X  |  library can be used as IDF RTOS component  |\n| **Linux**  |    |     |          |\n| Raspberry Pi |  X  |  X  | i2c-dev, spidev, sys/class/gpio  |\n| [SDL Emulation](https://github.com/lexus2k/lcdgfx/wiki/How-to-run-emulator-mode) |  X  |  X  | demo code can be run without real OLED HW via SDL library |\n| **macOS**  |    |     |          |\n| [SDL Emulation](https://github.com/lexus2k/lcdgfx/wiki/How-to-run-emulator-mode) |  X  |  X  | demo code can be run without real OLED HW via SDL library |\n| **Windows**  |    |     |          |\n| [SDL Emulation](https://github.com/lexus2k/lcdgfx/wiki/How-to-run-emulator-mode) |  X  |  X  | demo code can be run without real OLED HW via MinGW32 + SDL library |\n\nDigispark users, please check compilation options in your Arduino prior to using this library.\nlcdgfx library requires at least c++11 and c99 (by default Digispark package misses the options\n-std=gnu11, -std=gnu++11).\n\n## Useful tools\n\n[Tim's Image Pixel Editor](https://tims-pc-applications.blogspot.com/2020/05/tims-image-pixel-editor.html)\nThis is a little application made by Tim Jackson to edit and create Images and fonts for the small monochrome displays.\n\n[Built-in font generator](https://github.com/lexus2k/lcdgfx/wiki/How-to-create-new-font-for-the-library)\nLcdgfx library has built-in Python script to generate lcd fonts from ttf files.\n\n[Font format converter from bdf fonts by mayopan](https://github.com/mayopan/bdf2lcdgfx)\nFont format converter that converts bdf font to lcdgfx c style free\n\n## Projects using lcdgfx\n\n * [GUIslice](https://github.com/ImpulseAdventure/GUIslice) - nice platform independent GUI library for embedded systems\n * [Tension Meter](https://www.hackster.io/tangielsky/tension-meter-for-saw-blades-on-band-saws-with-arduino-3d3298)\n * [ESP32-CAM with Capacitive Touch Buttons and OLED](https://robotzero.one/esp32-cam-oled-capacitive-touch-buttons)\n * [nice TinyTrackGPS](https://rafaelreyescarmona.github.io/TinyTrackGPS) by Rafael Reyes\n\n\n## The goals of lcdgfx library\n\n * To use as few RAM as possible\n * To use as few Flash as possible\n * To be as fast as possible\n * To fit [Arkanoid game example](examples/games/arkanoid) to Attiny85 microcontroller\n\n## License\n\nThe library is free. If this project helps you, you can give me a cup of coffee.\n\nMIT License\n\nCopyright (c) 2016-2022, Alexey Dynda\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexus2k%2Flcdgfx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flexus2k%2Flcdgfx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flexus2k%2Flcdgfx/lists"}