add neopixel sketch. still working on hardware.
This commit is contained in:
parent
c4b175866d
commit
bf5b927cb3
|
@ -0,0 +1,25 @@
|
||||||
|
#include <Adafruit_NeoPixel.h>
|
||||||
|
|
||||||
|
#define PIN 9
|
||||||
|
#define NUM 7
|
||||||
|
|
||||||
|
//https://www.adafruit.com/product/2226
|
||||||
|
|
||||||
|
Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUM, PIN, NEO_GRBW + NEO_KHZ800);
|
||||||
|
|
||||||
|
float brightness = 0.2;
|
||||||
|
int b = floor(brightness * 255.0f);
|
||||||
|
|
||||||
|
void setup() {
|
||||||
|
Serial.begin(56700);
|
||||||
|
pixels.begin();
|
||||||
|
pixels.setBrightness(b);
|
||||||
|
pixels.fill( 0xFFFFFF);
|
||||||
|
pixels.show();
|
||||||
|
Serial.print("brightness: ");
|
||||||
|
Serial.println(b);
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop () {
|
||||||
|
pixels.show();
|
||||||
|
}
|
Loading…
Reference in New Issue