{"id":49151690,"url":"https://github.com/badgerloop-software/tft-display-tutorial","last_synced_at":"2026-04-22T06:11:39.040Z","repository":{"id":317089356,"uuid":"1056731547","full_name":"badgerloop-software/tft-display-tutorial","owner":"badgerloop-software","description":"Tutorial for Firmware Steering Wheel Display","archived":false,"fork":false,"pushed_at":"2025-09-28T18:10:41.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-28T20:27:35.659Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/badgerloop-software.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-14T17:33:42.000Z","updated_at":"2025-09-28T18:10:44.000Z","dependencies_parsed_at":"2025-09-28T20:27:45.037Z","dependency_job_id":null,"html_url":"https://github.com/badgerloop-software/tft-display-tutorial","commit_stats":null,"previous_names":["badgerloop-software/tft-display-tutorial"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/badgerloop-software/tft-display-tutorial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badgerloop-software%2Ftft-display-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badgerloop-software%2Ftft-display-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badgerloop-software%2Ftft-display-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badgerloop-software%2Ftft-display-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badgerloop-software","download_url":"https://codeload.github.com/badgerloop-software/tft-display-tutorial/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badgerloop-software%2Ftft-display-tutorial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32123674,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T00:31:26.853Z","status":"online","status_checked_at":"2026-04-22T02:00:05.693Z","response_time":58,"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":[],"created_at":"2026-04-22T06:11:37.440Z","updated_at":"2026-04-22T06:11:39.035Z","avatar_url":"https://github.com/badgerloop-software.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TFT Display Tutorial with TFT_eSPI Library\n\nTutorial to understand how the TFT_eSPI library works and to get experience with the breadboard connections and ESP32.  \n\nTFT_eSPI() library: https://github.com/Bodmer/TFT_eSPI \n\n## Table of Contents\n- [Software Requirements](#software-requirements)\n- [Pin Connections](#pin-connections)\n- [Getting Started](#getting-started)\n- [Understanding the Configuration](#understanding-the-configuration)\n- [Implementing Display Functions](#implementing-display-functions)\n\n## Software Requirements\n- [PlatformIO IDE](https://platformio.org/) (VS Code extension recommended)  \n- [ESP 32 Virtual COM PORT driver](https://www.silabs.com/software-and-tools/usb-to-uart-bridge-vcp-drivers)\n- USB cable for ESP32 programming\n\n## Pin Connections\n\nConnect the display to the ESP32 as follows:\n\n| Display Pin | ESP32 Pin | Description |\n|-------------|-----------|-------------|\n| VCC         | 3.3V      | Power supply |\n| GND         | GND       | Ground |\n| CS          | GPIO 15   | Chip Select |\n| RST         | GPIO 4    | Reset |\n| A0/DC       | GPIO 2    | Data/Command |\n| SDA         | GPIO 23   | MOSI (Data) |\n| SCK         | GPIO 18   | Clock |\n| LED         | 3.3V      | Backlight |\n\n## Getting Started\n\n### 1. Clone the Project and create a new branch to work on\nDownload this tutorial project to your local machine. Use git checkout -b ___________ where ___________ is the branch name\n\n### 2. Open in PlatformIO\n- Open VS Code\n- Install the PlatformIO IDE extension if not already installed\n- Open the project folder in PlatformIO\n\n## Understanding the Configuration\n\n### Display Driver Configuration\nThe project is configured for an ST7735 display using build flags in `platformio.ini`:\n\n```ini\n-D ST7735_DRIVER           # Specify ST7735 driver\n-D ST7735_GREENTAB2        # Display variant\n-D TFT_MISO=19            # SPI MISO (optional for display)\n-D TFT_MOSI=23            # SPI MOSI (data line)\n-D TFT_SCLK=18            # SPI Clock\n-D TFT_CS=15              # Chip Select\n-D TFT_DC=2               # Data/Command pin\n-D TFT_RST=4              # Reset pin\n```\n\n### Key Build Flags Explained\n- `USER_SETUP_LOADED`: Tells TFT_eSPI to use custom configuration\n- `LOAD_GLCD`: Enables built-in fonts\n- `SMOOTH_FONT`: Enables smooth font rendering\n- `SPI_FREQUENCY=27000000`: Sets SPI speed to 27MHz\n\n## Implementing Display Functions\n\n### Your Task: Complete the Functions\n\nYou need to implement three functions in `src/display.cpp`:\n\n#### 1. `initDisplay()`\n**Objective**: Initialize the display with horizontal orientation and orange background\n\n**Steps to implement**:\n- Initialize the TFT object\n- Set display rotation for horizontal orientation\n- Fill the screen with orange color\n\n#### 2. `setDisplayColor(uint16_t color)`\n**Objective**: Change the entire display to a specified color\n\n**Steps to implement**:\n- Use the provided color parameter to fill the entire screen\n\n#### 3. `cycleDisplayColor()`\n**Objective**: Cycle through different colors automatically\n\n\n### Useful TFT_eSPI Functions\n\nGo through TFT_eSPI.h in the library's github repo to learn about all the methods\n\n### Common Colors (16-bit RGB565 format)\n```cpp\nTFT_BLACK       // 0x0000\nTFT_NAVY        // 0x000F\nTFT_DARKGREEN   // 0x03E0\nTFT_DARKCYAN    // 0x03EF\nTFT_MAROON      // 0x7800\nTFT_PURPLE      // 0x780F\nTFT_OLIVE       // 0x7BE0\nTFT_LIGHTGREY   // 0xC618\nTFT_DARKGREY    // 0x7BEF\nTFT_BLUE        // 0x001F\nTFT_GREEN       // 0x07E0\nTFT_CYAN        // 0x07FF\nTFT_RED         // 0xF800\nTFT_MAGENTA     // 0xF81F\nTFT_YELLOW      // 0xFFE0\nTFT_WHITE       // 0xFFFF\nTFT_ORANGE      // 0xFD20\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadgerloop-software%2Ftft-display-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadgerloop-software%2Ftft-display-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadgerloop-software%2Ftft-display-tutorial/lists"}