Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions Tools/Developer/FastLedRainbow/FastLedRainbow.ino
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// SPDX-FileCopyrightText: 2026 PCController contributors
// SPDX-License-Identifier: MIT
#include <FastLED.h>

constexpr uint8_t DataPin = PIN_PD6; // Arduino D6, PCController strip data
constexpr uint8_t PixelCount = 100;
CRGB pixels[PixelCount];
uint8_t hue = 0;
uint32_t frames = 0;
uint32_t lastReport = 0;

void setup() {
// Disable the PCController's unrelated active-low shift-register outputs.
digitalWrite(PIN_PB0, HIGH);
pinMode(PIN_PB0, OUTPUT);
Serial.begin(115200);
FastLED.addLeds<WS2811, DataPin, BRG>(pixels, PixelCount);
FastLED.setBrightness(64);
FastLED.clear(true);
Serial.println(F("FastLED rainbow: D6/PD6, WS2811, BRG, 100 pixels, brightness 64"));
}

void loop() {
fill_rainbow(pixels, PixelCount, hue++, 7);
FastLED.show();
++frames;
if (millis() - lastReport >= 2000) {
lastReport = millis();
Serial.print(F("rainbow frames="));
Serial.println(frames);
}
delay(20);
}
21 changes: 21 additions & 0 deletions Tools/Developer/FastLedRainbow/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# FastLED rainbow hardware test

Standalone LED test for the MiniCore ATmega328P PCController board:
D6/PD6, 100 WS2811 pixels, BRG color order, brightness 64/255, animated rainbow.
The active-low 74HC595 output enable on D8/PB0 is held disabled. Other controller
features are absent while this sketch is installed. This does not modify EEPROM.
Serial at 115200 baud reports startup configuration and frame count every two seconds.
Frame reports establish firmware execution, not physical LED output.

Requires MiniCore and FastLED (verified with MiniCore 3.1.3, FastLED 3.10.5).
Compile and upload using Arduino CLI, replacing COM3 with the actual board port:

```powershell
arduino-cli compile --fqbn MiniCore:avr:328:clock=16MHz_external,variant=modelP,bootloader=uart0 --build-path work/rainbow-build Tools/Developer/FastLedRainbow
arduino-cli upload --fqbn MiniCore:avr:328:clock=16MHz_external,variant=modelP,bootloader=uart0 --port COM3 --input-dir work/rainbow-build Tools/Developer/FastLedRainbow
```

This replaces the controller application. Preserve a board-local flash/EEPROM
backup before uploading if the installed firmware must be recoverable. Keep
those device backups private. Restore normal PCController firmware when done.
A WS2812B strip instead needs WS2812B and GRB in the addLeds template.
Loading