From e197473edbc70057bd606c281841c45315a0690c Mon Sep 17 00:00:00 2001 From: Sebastian Jaeckel Date: Tue, 3 Dec 2024 15:16:01 +0100 Subject: [PATCH] platformio,main: add and initialize the NeoPixel --- platformio.ini | 1 + src/main.cpp | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/platformio.ini b/platformio.ini index 7034d2a..f61b08f 100644 --- a/platformio.ini +++ b/platformio.ini @@ -16,3 +16,4 @@ build_flags = lib_deps = thelsing/knx @ ^1.5.0 + adafruit/Adafruit NeoPixel@^1.12.3 diff --git a/src/main.cpp b/src/main.cpp index b87228b..2be0774 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,9 +1,16 @@ #include +#include -void setup(){ +#define NUMPIXELS 1 +Adafruit_NeoPixel pixels(NUMPIXELS, PIN_NEOPIXEL, NEO_GRB + NEO_KHZ800); + +void setup() { + pixels.begin(); + pixels.setPixelColor(0, pixels.Color(0, 150, 0)); + pixels.show(); } -void loop(){ +void loop() { }