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
Merge PR #1: PlatformIO migration with incoming CLAUDE.md
Merged platformio-migration branch into main, accepting the incoming
CLAUDE.md file which contains updated PlatformIO workflow documentation.
## Changes
- Updated .gitignore for PlatformIO artifacts
- Updated CLAUDE.md with PlatformIO installation and workflow
- Removed legacy bin/arduino-cli
- Added examples/RotatingDonut/ with PlatformIO structure
- Moved BoardConfig from config/ to lib/BoardConfig/
- Added library.json files for shared libraries
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
This repo lets anyone build a new LED‑matrix game quickly, visualize it in a terminal, and keep hardware + tools in sync. Follow this flow and you’re productive on day one.
3
+
This repo lets anyone build a new LED‑matrix game quickly, visualize it in a terminal, and keep hardware + tools in sync. Follow this flow and you're productive on day one.
4
4
5
5
1) Configure The Board Once
6
-
- Edit `config/BoardConfig.h` (single source of truth):
6
+
- Edit `lib/BoardConfig/BoardConfig.h` (single source of truth):
7
7
-`MATRIX_WIDTH/HEIGHT` (default 8x8)
8
8
-`LED_PIN` (default 14) and `BRIGHTNESS_LIMIT` (≤ 60)
9
9
-`COLOR_ORDER` (use `RGB` for Waveshare ESP32‑S3‑Matrix)
- All games include this file; change it once and everything follows.
12
12
13
13
2) Use The Shared Helpers
14
-
- Include in your sketch:
15
-
-`#include "config/BoardConfig.h"`
16
-
-`#include "lib/MatrixUtil/MatrixUtil.h"`
14
+
- Include in your sketch (`src/main.cpp`):
15
+
```cpp
16
+
#include<FastLED.h>
17
+
#include<BoardConfig.h>
18
+
#include<MatrixUtil.h>
19
+
```
17
20
- What you get:
18
21
-`MU_XY(x,y)`: stable XY→index mapping honoring the board profile
19
22
-`MU_ADD_LEDS(DATA_PIN, leds, count)`: FastLED init using shared `COLOR_ORDER`
@@ -23,9 +26,10 @@ This repo lets anyone build a new LED‑matrix game quickly, visualize it in a t
23
26
24
27
Minimal New‑Game Template
25
28
```cpp
29
+
// src/main.cpp
26
30
#include<FastLED.h>
27
-
#include"config/BoardConfig.h"
28
-
#include"lib/MatrixUtil/MatrixUtil.h"
31
+
#include<BoardConfig.h>
32
+
#include<MatrixUtil.h>
29
33
30
34
#defineNUM_LEDS (MATRIX_WIDTH * MATRIX_HEIGHT)
31
35
CRGB leds[NUM_LEDS];
@@ -53,40 +57,129 @@ void loop() {
53
57
}
54
58
```
55
59
56
-
3) Build / Flash (ESP32‑S3) **IMPORTANT MAKE SURE TO FOLLOW**
57
-
-USB CDC On Boot = Enabled (prevents Serial from blocking) use and only use if you need to debug Serial.
58
-
- Use the bundled CLI at `./bin/arduino-cli`:
59
-
- First‑time setup (once):
60
-
-`./bin/arduino-cli config init`
61
-
-`./bin/arduino-cli core update-index`
62
-
- Prepare the dependency for esp32
63
-
-`./bin/arduino-cli config set network.connection_timeout 1000s` Increase the timeout for the big download, WARN USER this gonna take some time, possible (10-20min), so need to be patient.
**Why uv?** 10-100x faster than pip, handles PATH automatically, keeps Python environment clean. It's the modern standard for installing Python CLI tools.
-**Flash size mismatch:** If you see "Detected size(4096k) smaller than (8192k)" on boot, use `board = adafruit_feather_esp32s3` in platformio.ini (NOT esp32-s3-devkitc-1)
202
+
-**Upload issues:** See "Upload Troubleshooting" section above for button sequences
203
+
-**Wrong device detected:** If `lsusb` shows "MicroPython" or "Pico" instead of "Espressif", that's the internal CM5 system. Replug the ESP32's USB cable.
204
+
-**Include errors:** Use `#include <BoardConfig.h>` and `#include <MatrixUtil.h>` (angle brackets, not quotes or paths)
205
+
-**Shared libs not found:** Add `lib_extra_dirs = ../../lib` to platformio.ini
105
206
106
-
DEBUGING ISSUES
107
-
- when automatic upload fails, always ask for user to manual put device into bootloader mode, then wait for confirm before reflush again
108
-
- MicroPython Board in FS mode is a pico device (which belong to the internal system), you should see ESP devie when you try lsusb, if not remind user to try replug in usb
0 commit comments