-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Add GC9A01 round TFT display usermod #4989
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
srg74
wants to merge
142
commits into
wled:main
Choose a base branch
from
srg74:feature/gc9a01-display-usermod
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,644
−38
Open
Changes from all commits
Commits
Show all changes
142 commits
Select commit
Hold shift + click to select a range
14e46c2
Update .gitignore
srg74 bf5e5cc
Merge branch 'wled:main' into main
srg74 f91f5f3
Merge branch 'wled:main' into main
srg74 4e9978d
Merge branch 'wled:main' into main
srg74 e88b5fc
Merge branch 'wled:main' into main
srg74 101cea1
Merge branch 'wled:main' into main
srg74 359d5f1
Merge branch 'wled:main' into main
srg74 9236650
Merge branch 'wled:main' into main
srg74 1bc0fb0
Merge branch 'wled:main' into main
srg74 12dfa64
Merge branch 'wled:main' into main
srg74 4d803fc
Merge branch 'wled:main' into main
srg74 52a1468
Merge branch 'wled:main' into main
srg74 f242f21
Merge branch 'wled:main' into main
srg74 ff095c3
Merge branch 'wled:main' into main
srg74 5dd2332
Merge branch 'wled:main' into main
srg74 5d7793c
Merge branch 'wled:main' into main
srg74 6d3da55
Merge branch 'wled:main' into main
srg74 b0fe8a5
Merge branch 'wled:main' into main
srg74 9ed02f7
Merge branch 'wled:main' into main
srg74 9dc4472
Merge branch 'wled:main' into main
srg74 768d6c0
Merge branch 'wled:main' into main
srg74 5dd861b
Merge branch 'wled:main' into main
srg74 6f133f0
Merge branch 'wled:main' into main
srg74 fcf2797
Merge branch 'wled:main' into main
srg74 bb47ab7
Merge branch 'wled:main' into main
srg74 20df3d3
Merge branch 'wled:main' into main
srg74 35c8b02
Merge branch 'wled:main' into main
srg74 131728d
Merge branch 'wled:main' into main
srg74 7c29480
Merge branch 'wled:main' into main
srg74 4d469f2
Merge branch 'wled:main' into main
srg74 5266dbe
Merge branch 'wled:main' into main
srg74 f76422a
Merge branch 'wled:main' into main
srg74 aeea906
Merge branch 'wled:main' into main
srg74 c849310
Merge branch 'wled:main' into main
srg74 27a2f82
Merge branch 'wled:main' into main
srg74 6f57c60
Merge branch 'wled:main' into main
srg74 4946882
Merge branch 'wled:main' into main
srg74 b099eda
Update .gitignore
srg74 795e84c
Merge branch 'wled:main' into main
srg74 fff67c0
Merge branch 'wled:main' into main
srg74 bc939c9
Merge branch 'wled:main' into main
srg74 adbf826
Merge branch 'wled:main' into main
srg74 eb6bcf5
Merge branch 'wled:main' into main
srg74 bb717e4
Merge branch 'wled:main' into main
srg74 8d1d661
Merge branch 'wled:main' into main
srg74 c79aad2
Merge branch 'wled:main' into main
srg74 bb9ecfe
Merge branch 'wled:main' into main
srg74 bd015ea
Merge branch 'wled:main' into main
srg74 a6a070b
Merge branch 'wled:main' into main
srg74 b9c1ee4
Merge branch 'wled:main' into main
srg74 9c37575
Merge branch 'wled:main' into main
srg74 4184194
Merge branch 'wled:main' into main
srg74 7c31e29
Merge branch 'wled:main' into main
srg74 adb2a1d
Merge branch 'wled:main' into main
srg74 96e1dd3
Merge branch 'wled:main' into main
srg74 68a59ce
Merge branch 'wled:main' into main
srg74 0daabb2
Merge branch 'wled:main' into main
srg74 51a7431
Merge branch 'wled:main' into main
srg74 e2c8fc6
Merge branch 'wled:main' into main
srg74 fdb86ea
Merge branch 'wled:main' into main
srg74 536c51b
Merge branch 'wled:main' into main
srg74 d90b522
Merge branch 'wled:main' into main
srg74 7b21f88
Merge branch 'wled:main' into main
srg74 7c12ca5
Merge branch 'wled:main' into main
srg74 8a44f28
Merge branch 'wled:main' into main
srg74 6742bf4
Merge branch 'wled:main' into main
srg74 f33489f
Merge branch 'wled:main' into main
srg74 c039dc8
Merge branch 'wled:main' into main
srg74 bfd8277
Merge branch 'wled:main' into main
srg74 d06cb86
Merge branch 'wled:main' into main
srg74 26eea90
Merge branch 'wled:main' into main
srg74 9fc69d3
Merge branch 'wled:main' into main
srg74 f5ac263
Merge branch 'wled:main' into main
srg74 21c1906
Merge branch 'wled:main' into main
srg74 9acb828
Merge branch 'wled:main' into main
srg74 da6b56d
Merge branch 'wled:main' into main
srg74 18ec45d
Merge branch 'wled:main' into main
srg74 41b0200
Merge branch 'wled:main' into main
srg74 454bed6
Merge branch 'wled:main' into main
srg74 d453ae0
Merge branch 'wled:main' into main
srg74 3179d9a
Merge branch 'wled:main' into main
srg74 ecd4443
Merge branch 'wled:main' into main
srg74 1d9256c
Merge branch 'wled:main' into main
srg74 6c34014
Merge branch 'wled:main' into main
srg74 9148c07
Update fork with upstream WLED main branch
srg74 6aad438
Merge branch 'wled:main' into main
srg74 4d3daba
Merge branch 'wled:main' into main
srg74 45687b9
Merge branch 'wled:main' into main
srg74 225ed4b
Merge branch 'wled:main' into main
srg74 584502b
Merge branch 'wled:main' into main
srg74 9fcb223
Merge branch 'wled:main' into main
srg74 b172281
Merge branch 'wled:main' into main
srg74 0f12124
Merge branch 'wled:main' into main
srg74 c01d691
Merge branch 'wled:main' into main
srg74 8a74eb6
Update .gitignore
srg74 4689375
Update .gitignore
srg74 4d52ebd
Add GC9A01 round TFT display usermod
srg74 9e9cc47
Fix palette navigation wraparound in rotary encoder ALT
srg74 3fe5866
Address PR feedback: fix documentation and palette handling
srg74 012f5ef
Remove Wire library dependency from library.json
srg74 ef22813
Address PR feedback for GC9A01 usermod
srg74 4521b22
Address PR feedback for GC9A01 usermod
srg74 7d6a2c6
Use DEBUG_PRINTF/DEBUG_PRINTLN macros for consistency
srg74 0c9c80f
Remove redundant Serial.println calls in rotary encoder usermod
srg74 49c6099
Add null pointer checks for gc9a01Display->updateRedrawTime() calls
srg74 b927bae
Fix null pointer dereference in rotary encoder ui usermod display calls
srg74 de40a6f
Merge branch 'wled:main' into main
srg74 9a45350
Merge branch 'wled:main' into main
srg74 a922285
Merge branch 'wled:main' into main
srg74 4f97333
Merge branch 'wled:main' into main
srg74 90e36cf
Merge branch 'wled:main' into main
srg74 9edd538
Merge branch 'wled:main' into main
srg74 9a926e7
Merge branch 'wled:main' into main
srg74 ef09ea3
Merge branch 'wled:main' into main
srg74 1d10ba0
Merge branch 'wled:main' into main
srg74 ba7a14e
Merge branch 'wled:main' into main
srg74 f9e1182
Merge branch 'main' into feature/gc9a01-display-usermod
srg74 5f3e2a4
Merge branch 'wled:main' into main
srg74 7c96cea
Merge branch 'wled:main' into main
srg74 38bbb3a
Merge branch 'wled:main' into main
srg74 203fa09
Merge branch 'wled:main' into main
srg74 9a0bd8f
Merge branch 'wled:main' into main
srg74 a89b674
Merge branch 'wled:main' into main
srg74 f644ea8
Merge branch 'wled:main' into main
srg74 39991bb
Merge branch 'wled:main' into main
srg74 49055b6
Update wled.h
srg74 560ad03
Merge branch 'wled:main' into main
srg74 0b9d799
Merge branch 'wled:main' into main
srg74 09d15ea
Merge branch 'wled:main' into main
srg74 c39d6d9
Merge branch 'wled:main' into main
srg74 afbbd0d
Merge branch 'wled:main' into main
srg74 b22fcbd
Merge branch 'wled:main' into main
srg74 ed3a44a
Merge branch 'main' into main
srg74 e3fbd3d
Merge branch 'wled:main' into main
srg74 b89f4bd
Merge branch 'wled:main' into main
srg74 632283c
Merge branch 'wled:main' into main
srg74 2727936
Merge branch 'wled:main' into main
srg74 75be308
Merge branch 'wled:main' into main
srg74 1756b8d
Merge branch 'wled:main' into main
srg74 e650912
Merge branch 'main' into feature/gc9a01-display-usermod
srg74 e228aca
Address PR review findings for GC9A01 display usermod
srg74 3187524
Update platformio.ini
srg74 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "name": "gc9a01_display", | ||
| "build": { "libArchive": false }, | ||
| "dependencies": { | ||
| "bodmer/TFT_eSPI": "^2.5.43" | ||
| } | ||
| } |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,115 @@ | ||
| # GC9A01 Display Usermod | ||
|
|
||
| A fully-featured WLED usermod providing comprehensive visual interface on GC9A01 240x240 round TFT displays with complete rotary encoder integration. | ||
|
|
||
| ## Features | ||
|
|
||
| ### Visual Interface | ||
|
|
||
| - **Circular Design**: Optimized for 240x240 round displays with blue bezel theming | ||
| - **Real-time Clock**: Large digital clock display (12/24-hour formats) | ||
| - **WiFi Signal Strength**: Visual signal strength indicator with 4-level bars (25%, 50%, 75%, 100%) | ||
| - **Power Status**: Dynamic "OFF [switch] ON" layout with contextual text | ||
| - **Brightness Arc**: Semicircular brightness visualization | ||
| - **Color Controls**: Three color buttons (FX, BG, CS) with live color preview and automatic updates | ||
| - **Effect Display**: Current effect name | ||
| - **Palette Display**: Current palette name | ||
| - **Startup Logo**: WLED logo display during initialization | ||
|
|
||
| ### Modes | ||
|
|
||
| - **Sleep Mode**: Automatic display sleep after configurable timeout (5-300 seconds) | ||
| - **Clock Mode**: Alternative to sleep - shows clock instead of turning off display | ||
| - **Wake on Interaction**: Automatic wake on rotary encoder use or button press | ||
| - **Unified Timeout**: Single configurable timeout controls both sleep and clock modes | ||
| - **Backlight Control**: PWM-based brightness control (0-100%) | ||
|
|
||
| ### Performance Features | ||
|
|
||
| - **State Caching**: Minimal redraws using comprehensive change detection | ||
| - **Smart Updates**: Automatic color button updates when colors change from any source (web UI, API, etc.) | ||
| - **Non-blocking Updates**: Asynchronous display updates following Four Line Display ALT pattern | ||
| - **Memory Optimized**: Efficient memory usage with proper cleanup | ||
| - **Debug Support**: Comprehensive debug logging with WLED macros | ||
|
|
||
| ## Hardware Requirements | ||
|
|
||
| - ESP32 development board | ||
| - GC9A01 240x240 TFT display (round) | ||
| - Optional: Rotary encoder (usermod_v2_rotary_encoder_ui_ALT) | ||
|
|
||
| ## Wiring | ||
|
|
||
| ### GC9A01 Display | ||
|
|
||
| | GC9A01 Pin | ESP32 Pin | Function | Description | | ||
| |------------|-----------|-------------|-------------| | ||
| | VCC | 3.3V | Power | 3.3V power supply | | ||
| | GND | GND | Ground | Common ground | | ||
| | SCL/SCLK | GPIO18 | SPI Clock | SPI clock signal | | ||
| | SDA/MOSI | GPIO23 | SPI MOSI | SPI data out | | ||
| | RES/RST | GPIO17 | Reset | Display reset | | ||
| | DC | GPIO15 | Data/Command| Data/Command control | | ||
| | CS | GPIO5 | Chip Select | SPI chip select | | ||
| | BL | GPIO26 | Backlight | Backlight control | | ||
|
|
||
| **Note**: Pin assignments can be customized via build flags (see Configuration section). | ||
|
|
||
| ### Basic Setup | ||
|
|
||
| Add to your `platformio_override.ini`: | ||
|
|
||
| ```ini | ||
| [env:esp32_gc9a01] | ||
| extends = env:esp32dev | ||
| upload_speed = 460800 | ||
| monitor_speed = 115200 | ||
| custom_usermods = | ||
| usermod_v2_gc9a01_display | ||
| usermod_v2_rotary_encoder_ui_ALT | ||
| build_flags = ${common.build_flags} ${esp32_idf_V4.build_flags} | ||
| -D WLED_DEBUG | ||
| -D WLED_DISABLE_BROWNOUT_DET | ||
| -D USERMOD_GC9A01_DISPLAY | ||
| -DUSER_SETUP_LOADED=1 | ||
| -DGC9A01_DRIVER=1 | ||
| -DTFT_WIDTH=240 | ||
| -DTFT_HEIGHT=240 | ||
| -DTFT_MOSI=23 | ||
| -DTFT_SCLK=18 | ||
| -DTFT_CS=5 | ||
| -DTFT_DC=15 | ||
| -DTFT_RST=17 | ||
| -DTFT_BL=26 | ||
| -DTOUCH_CS=-1 | ||
| -DLOAD_GLCD=1 | ||
| -DLOAD_FONT2=1 | ||
| -DLOAD_FONT4=1 | ||
| -DLOAD_FONT6=1 | ||
| -DLOAD_FONT7=1 | ||
| -DLOAD_FONT8=1 | ||
| -DLOAD_GFXFF=1 | ||
| -DSMOOTH_FONT=1 | ||
| -DSPI_FREQUENCY=27000000 | ||
| # Rotary encoder settings | ||
| -D ENCODER_DT_PIN=25 | ||
| -D ENCODER_CLK_PIN=32 | ||
| -D ENCODER_SW_PIN=27 | ||
| ``` | ||
|
|
||
| ### Debug Information | ||
|
|
||
| Enable debug output with `-D WLED_DEBUG` to see detailed logging: | ||
|
|
||
| - Display initialization status and TFT_eSPI configuration | ||
| - Update timing information and redraw triggers | ||
| - State change detection (brightness, effect, colors, etc.) | ||
| - Sleep/wake events and timeout tracking | ||
| - Error conditions and recovery attempts | ||
|
|
||
| Debug output appears in Serial Monitor at 115200 baud. | ||
|
|
||
| ## Change log | ||
|
|
||
| - **v1** (2025-10-06): | ||
| - First public release | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.