initial commit
This commit is contained in:
45
libraries/FastLED/ci/adafruit_bridge/adafruit_bridge.ino.cpp
Normal file
45
libraries/FastLED/ci/adafruit_bridge/adafruit_bridge.ino.cpp
Normal file
@@ -0,0 +1,45 @@
|
||||
|
||||
|
||||
|
||||
#define FASTLED_USE_ADAFRUIT_NEOPIXEL
|
||||
#include "FastLED.h"
|
||||
|
||||
// Test the non-template Adafruit bridge
|
||||
#define DATA_PIN 2
|
||||
#define NUM_LEDS 144
|
||||
|
||||
// Test LED arrays with different RGB orders
|
||||
CRGB leds_grb[NUM_LEDS];
|
||||
CRGB leds_rgb[NUM_LEDS];
|
||||
CRGB leds_bgr[NUM_LEDS];
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
|
||||
// Test template controllers
|
||||
FastLED.addLeds<WS2812, DATA_PIN, GRB>(leds_grb, NUM_LEDS);
|
||||
FastLED.addLeds<WS2812, DATA_PIN+1, RGB>(leds_rgb, NUM_LEDS);
|
||||
FastLED.addLeds<WS2812, DATA_PIN+2, BGR>(leds_bgr, NUM_LEDS);
|
||||
|
||||
// Fill with test patterns
|
||||
fill_rainbow(leds_grb, NUM_LEDS, 0, 255/NUM_LEDS);
|
||||
fill_solid(leds_rgb, NUM_LEDS, CRGB::Red);
|
||||
fill_solid(leds_bgr, NUM_LEDS, CRGB::Blue);
|
||||
|
||||
FastLED.show();
|
||||
Serial.println("Adafruit bridge test initialized");
|
||||
}
|
||||
|
||||
void loop() {
|
||||
static uint8_t hue = 0;
|
||||
|
||||
// Update colors
|
||||
fill_rainbow(leds_grb, NUM_LEDS, hue, 255/NUM_LEDS);
|
||||
fill_solid(leds_rgb, NUM_LEDS, CHSV(hue, 255, 255));
|
||||
fill_solid(leds_bgr, NUM_LEDS, CHSV(hue + 128, 255, 255));
|
||||
|
||||
FastLED.show();
|
||||
|
||||
hue += 2;
|
||||
delay(50);
|
||||
}
|
||||
13
libraries/FastLED/ci/adafruit_bridge/platformio.ini
Normal file
13
libraries/FastLED/ci/adafruit_bridge/platformio.ini
Normal file
@@ -0,0 +1,13 @@
|
||||
[platformio]
|
||||
src_dir = symlink://../../../src
|
||||
|
||||
[env:dev]
|
||||
platform = https://github.com/pioarduino/platform-espressif32/releases/download/51.03.04/platform-espressif32.zip
|
||||
board = esp32-s3-devkitc-1
|
||||
framework = arduino
|
||||
lib_deps =
|
||||
adafruit/Adafruit NeoPixel
|
||||
|
||||
lib_ldf_mode=deep
|
||||
build_flags=-DFASTLED_STUB_MAIN_INCLUDE_INO="../ci/adafruit_bridge/adafruit_bridge.ino.cpp"
|
||||
-DFASTLED_USE_ADAFRUIT_NEOPIXEL=1
|
||||
Reference in New Issue
Block a user