FastLED / FastLED

The FastLED library for colored LED animation on Arduino. Please direct questions/requests for help to the FastLED Reddit community: http://fastled.io/r We'd like to use github "issues" just for tracking library bugs / enhancements.
http://fastled.io
MIT License
6.39k stars 1.63k forks source link

nrf52840 (multi boards) issue with APA102-2020 #1246

Open ddB0515 opened 3 years ago

ddB0515 commented 3 years ago

Hi

I have trying to run APA102 on my ItsyBitsy nRF52840 Express board and custom nRF52840 BBoard but no success I have 104 LEDs (4x26) and trying to get it working but code continue after 52 even if I specified only half Tried also with DATA_RATE_MHZ(x) but not helping I have level shifter and works fine with ESP32 so think could be nRF52 issue :thinking: Also tried with SK9822 and DOTSTAR same thing

Anyone had same issue or similar????

Simple demo

#define DATA_PIN 7
#define CLK_PIN  9
#define LED_TYPE  APA102
#define COLOR_ORDER  RGB
#define NUM_LEDS  52
#define BRIGHTNESS  8

CRGB leds[NUM_LEDS];

void setup() {
  delay(1000); 
  FastLED.addLeds<LED_TYPE, DATA_PIN, CLK_PIN, COLOR_ORDER>(leds, NUM_LEDS);
  FastLED.setCorrection(TypicalLEDStrip);
  FastLED.setBrightness(BRIGHTNESS);

}

void loop() {
   // Move a single white led 
   for(int whiteLed = 0; whiteLed < NUM_LEDS; whiteLed = whiteLed + 1) {
      // Turn our current led on to white, then show the leds
      leds[whiteLed] = CRGB::White;

      // Show the leds (only one of which is set to white, from above)
      FastLED.show();

      // Wait a little bit
      delay(100);

      // Turn our current led back to black for the next loop around
      leds[whiteLed] = CRGB::Black;
   }
}

Not sure if it will help this is how LED looks like http://www.digital-led-strips.com/2019-new-apa102-2020-rgb-256-grey-6-8-feet-led-chips.html

henrygab commented 2 years ago

define NUM_LEDS 52

It likely continues after 52 pixels because that's how many are defined to exist?