Skip to content

Instantly share code, notes, and snippets.

@nervetattoo
Last active October 30, 2016 13:58
Show Gist options
  • Save nervetattoo/2f1472c5357c2ad5cb98d8f47a5c8034 to your computer and use it in GitHub Desktop.
Save nervetattoo/2f1472c5357c2ad5cb98d8f47a5c8034 to your computer and use it in GitHub Desktop.
Neopixel
#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