Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Adafruit_NeoPixel.h>
- #ifdef __AVR__
- #include <avr/power.h>
- #endif
- #define PIN 10
- Adafruit_NeoPixel strip = Adafruit_NeoPixel(25, PIN, NEO_GRB + NEO_KHZ800);
- uint32_t RED = strip.Color( 255, 0, 0 );
- uint32_t BLUE = strip.Color( 0, 0, 255 );
- uint32_t WHITE = strip.Color( 255, 255, 255 );
- uint32_t LEDColours[25] = {
- RED, RED, RED,
- RED, RED, RED,
- WHITE, WHITE, WHITE,
- WHITE, WHITE, WHITE,
- WHITE, WHITE, WHITE,
- WHITE, WHITE, WHITE,
- RED, RED, RED,
- RED, RED, RED,
- BLUE
- };
- void setup() {
- strip.begin();
- strip.show();
- for(uint16_t i=0; i<strip.numPixels(); i++) {
- strip.setPixelColor(i, LEDColours[i]);
- strip.show();
- }
- }
- void loop() {
- }
Advertisement
Add Comment
Please, Sign In to add comment