FastLed crashes on Teensy3.2 and APA102

renaud

Member
Hello,

My Teensy3.2 crashes FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, BGR>(leds, NUM_LEDS);
Any idea what is wrong?
Thanks!

C:
#include <FastLED.h>

#define NUM_LEDS 80
#define DATA_PIN 0
#define CLOCK_PIN 1

#define SERIAL_SPEED 115200

CRGB leds[NUM_LEDS];

void setup() {
    Serial.begin(SERIAL_SPEED);
    delay(3000);
    Serial.println("Start setup");
    FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, BGR>(leds, NUM_LEDS);
    Serial.println("End setup");
}

void loop() {
  for(int i=0; i<NUM_LEDS; i++) {
    leds[i] = CRGB::Red;
    FastLED.show();
    delay(10);
    leds[i] = CRGB::Black;
  }
  FastLED.show();
}

pfatformio.ini:
Code:
[env:teensy31]
platform = teensy
board = teensy31
framework = arduino
lib_deps =
    FastLED
 
Back
Top