#include <FastLED.h>
#define NUM_LEDS 4
#define DATA_PIN 32
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
}
void loop() {
leds[0] = CRGB::Blue;
leds[1] = CRGB::Blue;
leds[2] = CRGB::Blue;
leds[3] = CRGB::Blue;
FastLED.show();
delay(2000);
leds[0] = CRGB::Black;
leds[1] = CRGB::Black;
leds[2] = CRGB::Black;
leds[3] = CRGB::Black;
FastLED.show();
delay(2000);
}
download arduino IDE source code file:
Uair-LED.zip (Size: 364 bytes / Downloads: 301)
Note: install "FastLED" library online firstly.
#define NUM_LEDS 4
#define DATA_PIN 32
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<WS2812B, DATA_PIN, GRB>(leds, NUM_LEDS);
}
void loop() {
leds[0] = CRGB::Blue;
leds[1] = CRGB::Blue;
leds[2] = CRGB::Blue;
leds[3] = CRGB::Blue;
FastLED.show();
delay(2000);
leds[0] = CRGB::Black;
leds[1] = CRGB::Black;
leds[2] = CRGB::Black;
leds[3] = CRGB::Black;
FastLED.show();
delay(2000);
}
download arduino IDE source code file:
Uair-LED.zip (Size: 364 bytes / Downloads: 301)
Note: install "FastLED" library online firstly.