#define NUM_LEDS 10
const int dataline = 6;
CRGB leds[NUM_LEDS];
void setup() {
Serial.begin(1250000);
LEDS.addLeds<WS2812B, dataline>(leds, NUM_LEDS);
}
int serialGlediator() {
while (!Serial.available()) {}
return Serial.read();
}
void loop() {
while (serialGlediator() != 1) {}
for (int i=0; i < NUM_LEDS; i++) {
leds[i].r = serialGlediator();
leds[i].g = serialGlediator();
leds[i].b = serialGlediator();
}
FastSPI_LED.show();
}
I use Arduino Nano-ws2812b 12mm (9 pcs) - 5 VDC 2 A
This got me up and running after a good hour of trying to get it working.. THANK YOU SO MUCH!
ReplyDeleteHere's what you just helped me accomlish: https://imgur.com/k1h8rA4
your welcome
DeleteHOLA AMIGO ME PODRIAS AYUDAR
ReplyDeleteISI TODO PERO NO ME ENCIENDEN LOS LEDS..SOLO MERECONOCE JINX A NANO.PERO NO PRENDE NADA