Lab_interaccio/2018/LLAC-RGBW-varios/FASTLED/FastLED-Lessons/examples/FastLED-01/FastLED-01.ino
2025-02-25 21:29:42 +01:00

29 lines
523 B
C++

#include "FastLED.h"
// How many leds in your strip?
#define NUM_LEDS 10
#define BRIGHTNESS 32
// What data pin on the board are they connected to?
#define DATA_PIN 17
// Define the array of leds
CRGB leds[NUM_LEDS];
void setup() {
FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
FastLED.setBrightness(32);
}
void loop() {
// Turn the LED on, then pause
leds[0] = CRGB::Red;
FastLED.show();
delay(500);
// Now turn the LED off, then pause
leds[0] = CRGB::Black;
FastLED.show();
delay(500);
}