Last active
October 30, 2016 13:58
-
-
Save nervetattoo/2f1472c5357c2ad5cb98d8f47a5c8034 to your computer and use it in GitHub Desktop.
Neopixel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "neopixel.h" | |
#define PIXEL_COUNT 29 | |
#define PIXEL_PIN D2 | |
#define PIXEL_TYPE WS2812B | |
Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL_COUNT, PIXEL_PIN, PIXEL_TYPE); | |
void setup() { | |
strip.begin(); | |
strip.show(); | |
} | |
void loop() { | |
int ledNumber = 0; | |
int red = 255; | |
int green = 0; | |
int blue = 0; | |
int brightness = 0; | |
strip.setPixelColor(0, strip.Color(red, green, blue, brightness)); | |
strip.show(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment