You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
config.scan_wiring = ScanPattern::STANDARD_TWO_SCAN; // Most panels use this
59
-
config.shift_driver = ShiftDriver::FM6126A; // Or GENERIC if unsure
60
-
61
-
// Set GPIO pins (see examples/common/pins_example.h for board-specific configs)
62
-
config.pins.r1 = 25;
63
-
config.pins.g1 = 26;
64
-
config.pins.b1 = 27;
65
-
config.pins.r2 = 14;
66
-
config.pins.g2 = 12;
67
-
config.pins.b2 = 13;
68
-
config.pins.a = 23;
69
-
config.pins.b = 19;
70
-
config.pins.c = 5;
71
-
config.pins.d = 17;
72
-
config.pins.e = -1;
73
-
config.pins.lat = 4;
74
-
config.pins.oe = 15;
75
-
config.pins.clk = 16;
76
-
77
-
// Create and start driver
78
-
Hub75Driver driver(config);
79
-
driver.begin(); // Starts continuous refresh
80
-
81
-
// Just draw - changes appear automatically!
82
-
driver.set_pixel(10, 10, 255, 0, 0); // Red pixel
83
-
driver.set_pixel(20, 20, 0, 255, 0); // Green pixel
84
-
driver.set_pixel(30, 30, 0, 0, 255); // Blue pixel
85
-
86
-
// Optional: Double buffering for tear-free animation
87
-
if (config.double_buffer) {
88
-
driver.clear(); // Clear back buffer
89
-
// ... draw frame ...
90
-
driver.flip_buffer(); // Atomic swap
91
-
}
92
-
}
93
-
```
40
+
Configure your panel hardware, set GPIO pins, call `begin()`, and start drawing pixels. The driver handles continuous DMA refresh automatically - no CPU intervention needed after initialization. Supports single pixels (`set_pixel`), bulk writes (`draw_pixels`), and double buffering for tear-free animation.
94
41
95
-
**See [components/hub75/README.md](components/hub75/README.md) for detailed API reference and configuration options.**
42
+
See [examples/](examples/) for working code and [Component Documentation](components/hub75/README.md) for complete API reference.
96
43
97
44
## Building & Testing Standalone
98
45
99
46
This repository includes a standalone test application and examples that can be built and run directly.
100
47
101
48
### Build and Run Test Application
102
49
103
-
The root project contains a simple test application in `main/`:
104
-
105
50
```bash
106
51
cd esp-hub75
107
52
idf.py set-target esp32s3 # or esp32, esp32s2, esp32c6, esp32p4
108
53
idf.py build
109
54
idf.py flash monitor
110
55
```
111
56
112
-
The test application is based on `examples/01_simple_test` and demonstrates basic pixel drawing.
113
-
114
57
### Build and Run Examples
115
58
116
-
Each example can be built independently:
117
-
118
59
```bash
119
-
cd examples/01_simple_test
60
+
cd examples/01_basic/simple_colors
120
61
idf.py set-target esp32s3
121
62
idf.py build
122
63
idf.py flash monitor
123
64
```
124
65
125
66
**Available Examples:**
67
+
- `01_basic/`- Simple color tests, gradients, brightness control
Each example includes a `README.md` with specific instructions and pin configuration guidance.
72
+
Each example includes specific instructions and pin configuration guidance.
133
73
134
74
## ESPHome Integration
135
75
136
-
```yaml
137
-
external_components:
138
-
- source: github://stuartparmenter/hub75-esphome
139
-
components: [ hub75_display ]
140
-
141
-
display:
142
-
- platform: hub75_display
143
-
id: my_display
144
-
panel_width: 64
145
-
panel_height: 64
146
-
scan_pattern: SCAN_1_32
147
-
shift_driver: FM6126A # Optional: for panels that need special init
148
-
149
-
# Multi-panel layout (optional)
150
-
layout_rows: 2
151
-
layout_cols: 2
152
-
layout: TOP_LEFT_DOWN # Serpentine wiring
153
-
154
-
# Pin configuration
155
-
pin_r1: 25
156
-
pin_g1: 26
157
-
pin_b1: 27
158
-
pin_r2: 14
159
-
pin_g2: 12
160
-
pin_b2: 13
161
-
pin_a: 23
162
-
pin_b: 19
163
-
pin_c: 5
164
-
pin_d: 17
165
-
pin_e: -1
166
-
pin_lat: 4
167
-
pin_oe: 15
168
-
pin_clk: 16
169
-
```
76
+
An ESPHome component is available that wraps this driver for easy integration with ESPHome projects. Supports all driver features including multi-panel layouts, shift driver initialization, and platform auto-detection.
170
77
171
-
See [hub75-esphome](https://github.com/stuartparmenter/hub75-esphome) repository for the full ESPHome component documentation.
78
+
See [hub75-esphome](https://github.com/stuartparmenter/hub75-esphome) for installation and configuration.
172
79
173
80
## Project Structure
174
81
175
82
This repository is structured as an **ESP-IDF component** with a standalone test application:
- **[Color & Gamma](docs/COLOR_GAMMA.md)** - CIE 1931 correction and bit depth guide
234
125
235
-
**Full documentation:** See [components/hub75/README.md](components/hub75/README.md) for complete API reference, configuration options, multi-panel layouts, and troubleshooting guidance.
126
+
**Pin configuration examples:** See [examples/common/](examples/common/) for board-specific GPIO layouts.
0 commit comments