{"id":19156925,"url":"https://github.com/bertrandmartel/st7735-raspberry","last_synced_at":"2026-05-16T17:07:19.394Z","repository":{"id":94808936,"uuid":"245660252","full_name":"bertrandmartel/st7735-raspberry","owner":"bertrandmartel","description":":sparkles: A port of ST7735 Arduino library to Raspberry PI","archived":false,"fork":false,"pushed_at":"2020-10-11T02:36:14.000Z","size":35,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-22T21:43:16.846Z","etag":null,"topics":["adafruit","cmake","cpp","lcd","raspberry-pi","st7735"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bertrandmartel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2020-03-07T15:46:28.000Z","updated_at":"2024-06-23T10:35:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"b6d8c50a-f644-43c4-8dc3-31bc53b7578a","html_url":"https://github.com/bertrandmartel/st7735-raspberry","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bertrandmartel/st7735-raspberry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandmartel%2Fst7735-raspberry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandmartel%2Fst7735-raspberry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandmartel%2Fst7735-raspberry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandmartel%2Fst7735-raspberry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bertrandmartel","download_url":"https://codeload.github.com/bertrandmartel/st7735-raspberry/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertrandmartel%2Fst7735-raspberry/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275773333,"owners_count":25526013,"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-09-18T02:00:09.552Z","response_time":77,"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":["adafruit","cmake","cpp","lcd","raspberry-pi","st7735"],"created_at":"2024-11-09T08:36:26.298Z","updated_at":"2025-09-18T13:28:36.711Z","avatar_url":"https://github.com/bertrandmartel.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ST7735 library for Raspberry PI\n\n![Build](https://github.com/bertrandmartel/st7735-raspberry/workflows/Build/badge.svg) [![License](http://img.shields.io/:license-mit-blue.svg)](LICENSE.md)\n\nA port of [ST7735 Arduino library](https://github.com/adafruit/Adafruit-ST7735-Library) and [ST7735 GFX Arduino library](https://github.com/adafruit/Adafruit-GFX-Library) to Raspberry PI using [wiringPi](https://github.com/WiringPi). The idea was to be able to control ST7735 TFT LCD on Raspberry PI using C++ instead of the regular Python libraries.\n\nSupported screens are :\n\n* [Adafruit ST7735 1.44'](https://www.adafruit.com/product/2088)\n* [Adafruit ST7735 1.8'](https://www.adafruit.com/product/358)\n\nFeatures implemented :\n\n- [x] fill screen\n- [x] draw rectangle\n- [x] draw text\n- [x] draw bitmap\n- [ ] read bitmap from SD card\n- [ ] draw vertical line\n- [ ] rotate screen\n- [ ] custom fonts\n- [ ] all other features of Adafruit-ST7735-Library\n\n\n## Prerequesites\n\n* wiringPi\n* cmake\n\n## Install library\n\nOn your Raspberry PI :\n\n```bash\ngit clone git://github.com/bertrandmartel/st7735-raspberry\ncd st7735-raspberry\ncmake .\nmake\nsudo make install\n```\n\n* Check the testing example (you may need to edit RST and DC pin inside `examples/main.cpp` :\n\n```bash\n./out/examples/main\n```\n\n## Wiring\n\n|  description  |    WiringPi    |   Physical pin|\n|---------------|----------------|------------|\n|     VCC       |       -        |      2     |\n|     GND       |       -        |     14     |\n|     DC        |       5        |     18     |\n|    MOSI       |       12       |     19    |\n|    RST      |       6        |     22    |\n|    CS         |       10       |     24    |\n|    SCK        |       14       |    23    |\n\nIn the library only RST and DC can be configured :\n\nCheck the pin diagram with `gpio readall`\n\n![st7735](https://user-images.githubusercontent.com/5183022/76146465-3f7f7c80-6093-11ea-9062-f3aa7439f023.png)\n\n1.44'            |  1.8'\n:-------------------------:|:-------------------------:\n![st7735](https://user-images.githubusercontent.com/5183022/76146461-3db5b900-6093-11ea-872a-24592b153a74.jpg)  | ![st7735](https://user-images.githubusercontent.com/5183022/76146463-3ee6e600-6093-11ea-850f-7b5cd5ef2b61.jpg)\n\n\n## Using the library\n\n```cpp\n#include \"st7735.h\"\n#include \"wiringPi.h\"\n\n#define TFT_RST  6\n#define TFT_DC   5\n\nAdafruit_ST7735 tft = Adafruit_ST7735(TFT_DC, TFT_RST);\n\nvoid setup() {\n    wiringPiSetup();\n    //tft.initR(INITR_144GREENTAB); //for 1,44'\n    tft.initR(INITR_BLACKTAB); //for 1.8'\n}\n\nint main() {\n    setup();\n    //fill screen with color\n    tft.fillScreen(ST7735_BLACK);\n\n    //draw a rectangle\n    //tft.fillRect(10, 10,  ST7735_TFTWIDTH_128 - 20, ST7735_TFTHEIGHT_128-20, ST7735_WHITE); //for 1.44'\n    tft.fillRect(10, 10,  ST7735_TFTWIDTH_128 - 20, ST7735_TFTHEIGHT_160-20, ST7735_WHITE); //for 1.8'\n\n    delay(750);\n\n    tft.fillScreen(ST7735_BLACK);\n    //draw text\n    tft.setTextBackground(ST7735_BLACK);\n    char hello[] = \"Hello world !\\nHello world !\\n\";\n    tft.drawString(hello, ST7735_WHITE, 1);\n    delay(1000);\n    tft.drawString(hello, ST7735_GREEN, 1);\n    delay(1000);\n\n    tft.drawString(\"H\", ST7735_BLUE, 1);\n    tft.drawString(\"E\", ST7735_BLUE, 1);\n    tft.drawString(\"L\", ST7735_WHITE, 1);\n    tft.drawString(\"L\", ST7735_WHITE, 1);\n    tft.drawString(\"O\", ST7735_RED, 1);\n    tft.drawString(\"!\", ST7735_RED, 1);\n\n    //draw bitmap\n    //tft.draw_bitmap_st7735(0, ST7735_TFTHEIGHT_128, imageLogo, ST7735_TFTWIDTH_128, ST7735_TFTHEIGHT_128); //for 1.44'\n    //tft.draw_bitmap_st7735(0, ST7735_TFTHEIGHT_160, imageLogo, ST7735_TFTWIDTH_128, ST7735_TFTHEIGHT_160); //for 1.8'\n\n    return 0;\n}\n```\n\n## Compile code linking to library\n\n```bash\ng++ main.cpp -lwiringPi -lst7735 -o main\n```\n\n## Cross compilation\n\nGet the [raspberry-dev](https://github.com/bertrandmartel/raspberry-dev) submodule by issuing : \n\n```bash\ngit submodule update --init --recursive\n```\n\nUse the `build.sh` script to cross compile the library :\n\n```bash\n./build.sh\n```\n\nThis will invoke `cmake . -DCMAKE_TOOLCHAIN_FILE=./raspberry-dev/toolchain.cmake` which will automatically download the toolchain and wiringPI library \n\n## License\n\n```\nThe MIT License (MIT)\n\nCopyright for portions of project st7735-raspberry are held by Limor Fried/Ladyada for Adafruit Industries \nas part of projects Adafruit-ST7735-Library and Adafruit-GFX-Library \n\nAll other copyright for project st7735-raspberry are held by Bertrand Martel, 2020.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject 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, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbertrandmartel%2Fst7735-raspberry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbertrandmartel%2Fst7735-raspberry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbertrandmartel%2Fst7735-raspberry/lists"}