Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <FastLED.h>
- #define LED_PIN 2
- #define NUM_LEDS 5
- void setup () {
- FastLED.addLeds<WS2812, LED_PIN, RGB>(leds, NUM_LEDS);
- FastLED.setMaxPowerInVoltsAndMilliamps(5, 500);
- FastLED.clear();
- FastLED.show();
- }
- void loop() {
- Leds[0] = CRGB(255, 0, 0);
- Leds[1] = CRGB(0, 255, 0);
- Leds[2] = CRGB(0, 0, 255);
- FastLED.show();
- }
Advertisement
Add Comment
Please, Sign In to add comment