Advertisement
KRITSADA

POP-X2 POP-7 ATX2 IPST-SE Connect NeoPixel on Pin 24

Aug 21st, 2019
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <FastLED.h>
  2. #define NUM_LEDS 16
  3. #define DATA_PIN 24
  4. CRGB leds[NUM_LEDS];
  5. int i;
  6. void setup() {
  7.       FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
  8. }
  9. void loop() {
  10.   for (i=0;i<16;i++){
  11.     leds[i] = CRGB::Red;
  12.     FastLED.show(); delay(50);
  13.   }
  14.   for (i=0;i<16;i++){
  15.     leds[i] = CRGB::Green;
  16.     FastLED.show(); delay(50);
  17.   }
  18.   for (i=0;i<16;i++){
  19.     leds[i] = CRGB::Blue;
  20.     FastLED.show(); delay(50);
  21.   }
  22.   for (i=0;i<16;i++){
  23.     leds[i] = CRGB::Yellow;
  24.     FastLED.show(); delay(50);
  25.   }
  26.   for (i=0;i<16;i++){
  27.     leds[i] = CRGB::White;
  28.     FastLED.show(); delay(50);
  29.   }
  30.   for (i=0;i<16;i++){
  31.     leds[i] = CRGB::Black;
  32.     FastLED.show();delay(50);
  33.   }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement