From bf5b927cb3cc44dfb9aeb035715281736622a168 Mon Sep 17 00:00:00 2001 From: mattmcw Date: Wed, 30 Oct 2024 16:00:05 -0400 Subject: [PATCH] add neopixel sketch. still working on hardware. --- .../mcopy_light_neopixel.ino | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 ino/components/mcopy_light_neopixel/mcopy_light_neopixel.ino diff --git a/ino/components/mcopy_light_neopixel/mcopy_light_neopixel.ino b/ino/components/mcopy_light_neopixel/mcopy_light_neopixel.ino new file mode 100644 index 0000000..496bafc --- /dev/null +++ b/ino/components/mcopy_light_neopixel/mcopy_light_neopixel.ino @@ -0,0 +1,25 @@ +#include + +#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(); +} \ No newline at end of file