NeoPixel LEDs

NeoPixel LEDs

Spyridon Ampanavos
fastLED.ino
#include <FastLED.h>
#define NUM_LEDS 6
#define LED_PIN 5

CRGBArray<NUM_LEDS> leds;

void setup() {
    FastLED.addLeds<NEOPIXEL,LED_PIN>(leds, NUM_LEDS);
}

void loop() {
    for (int i = 0; i < NUM_LEDS; i+= 1) {
        leds[i] = CHSV(0, 255, 200);  // color format: (hue, saturation, value)
                                      // first number defines hue in a scale from 0 to 255
                                      // second number defines saturation in a scale from 0 to 255
                                      // third numbers defines brightness in a scale from 0 to 255
    }
    FastLED.show();

}