Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <FastLED.h>
- #define DATA_PIN 7
- #define NUM_LEDS 6
- #define BRIGHTNESS 64
- #define LED_TYPE WS2812B
- #define COLOR_ORDER GRB
- // Define the array of leds
- CRGB leds[NUM_LEDS];
- #define UPDATES_PER_SECOND 100
- void setup() {
- FastLED.addLeds<LED_TYPE, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS);
- FastLED.setBrightness(BRIGHTNESS);
- }
- void loop() {
- // Turn the LED on
- //leds[0] = CRGB::Red;
- //leds[1] = CRGB::Green;
- //leds[2] = CRGB::Blue;
- leds[0] = CRGB(50, 100, 150);
- FastLED.show();
- delay(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement