Skip to content

Instantly share code, notes, and snippets.

@lmancini
Last active January 2, 2025 23:09
Show Gist options
  • Save lmancini/ce7432fd25ebfcef71a6310b71ee27c8 to your computer and use it in GitHub Desktop.
Save lmancini/ce7432fd25ebfcef71a6310b71ee27c8 to your computer and use it in GitHub Desktop.
Test program for ESP32
#include <FastLED.h>
#define NUM_LEDS 18
// Define the array of leds
CRGB leds[NUM_LEDS];
void setup() {
Serial.begin(115200);
FastLED.addLeds<WS2812, 19, RGB>(leds, NUM_LEDS);
FastLED.addLeds<WS2812, 21, RGB>(leds, NUM_LEDS);
FastLED.addLeds<WS2812, 22, RGB>(leds, NUM_LEDS);
FastLED.addLeds<WS2812, 23, RGB>(leds, NUM_LEDS);
FastLED.setMaxRefreshRate(0);
}
void loop() {
int start = millis();
for (int i = 0; i < 20; i++) {
FastLED.show();
}
int end = millis();
Serial.println(end-start);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment