This works on Wemos D1 mini
#define FASTLED_ESP8266_D1_PIN_ORDER // this lets you use Wemos pin numbering
#include<FastLED.h> // this brings in FastLED
#define NUM_LEDS 24 // set LED number
#define DATA_PIN 7
#define CLOCK_PIN 5
CRGBArray<NUM_LEDS> leds;
void setup() {
FastLED.addLeds<APA102, DATA_PIN, CLOCK_PIN, BGR, DATA_RATE_MHZ(12)>(leds, NUM_LEDS);
}
void loop() {
FastLED.clear();
// Turn the first led red for 1 second
//leds[0] = CRGB::Red;
//leds[1] = CRGB::Green;
//leds[2] = CRGB::Blue;
//FastLED.show();
//delay(1000);
for(int i=0; i<NUM_LEDS; i++){
leds[i].setRGB( 255, 0, 0);
}
FastLED.show();
delay(1000);
for(int i=0; i<NUM_LEDS; i++){
leds[i].setRGB( 0, 255, 0);
}
FastLED.show();
delay(1000);
for(int i=0; i<NUM_LEDS; i++){
leds[i].setRGB( 0, 0, 255);
}
FastLED.show();
delay(1000);
}
// end
