The following code, which is a stripped-down version of FastLED example Cylon, works perfectly fine on any Teensy 4.1 serial port I've tried (1, 3, 4, 6, 7), but not on serial 8 (pin 35), which seems to crash to program.
I'm wondering what the problem is... can somebody shed light on it?
I'm wondering what the problem is... can somebody shed light on it?
Code:
#include <WS2812Serial.h>
#define USE_WS2812SERIAL
#include <FastLED.h>
#define NUM_LEDS 144
#define DATA_PIN 1 // It works
// #define DATA_PIN 35 // It DOESN'T WORK
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812SERIAL, DATA_PIN, BRG>(leds, NUM_LEDS);
FastLED.setBrightness(100);
}
void loop() {
static uint8_t hue = 0;
for(int i = 0; i < NUM_LEDS; i++) {
leds[i] = CHSV(hue++, 255, 255);
FastLED.show();
FastLED.delay(5);
}
}