eshkrab / FastLED-esp32

Parallel outputs for esp32
MIT License
43 stars 3 forks source link

issue with ESP32 #2

Open hpwit opened 6 years ago

hpwit commented 6 years ago

I try for the ESP32

include

define NUM_LEDS_PER_STRIP 600

define NUM_STRIPS 2

CRGB leds[NUM_STRIPS * NUM_LEDS_PER_STRIP];

void setup() { Serial.begin(115200);

LEDS.addLeds<WS2811_PORTA,NUM_STRIPS>(leds, NUM_LEDS_PER_STRIP); LEDS.setBrightness(32); }

void loop() { static uint8_t hue = 0; for(int i = 0; i < NUM_STRIPS; i++) { for(int j = 0; j < NUM_LEDS_PER_STRIP; j++) { leds[(iNUM_LEDS_PER_STRIP) + j] = CHSV((32i) + hue+j,192,255); } }

// Set the first n leds on each strip to show which strip it is for(int i = 0; i < NUM_STRIPS; i++) { for(int j = 0; j <= i; j++) { leds[(i*NUM_LEDS_PER_STRIP) + j] = CRGB::Red; } }

hue++; long time1=millis(); LEDS.show(); long time2=millis()-time1; Serial.println((float)1000/time2); Serial.println(time2); LEDS.delay(10); } and it only affect 32 leds and I don't have the leds red lightning up at the beginning of the string. what am I doing wrong more whatever the value of NUM_LEDS_PER_STRIP, it is always the same speed of execution.

hpwit commented 6 years ago

Hello I have managed to make it work by adding the allow_interupt 0 thank you