Move the LED strip example to C++ and split the driver into a WS2812 class (ws2812.h/.cpp). The class takes the GPIO and LED count in its constructor and provides set(), fill(), write(), setBrightness() and a static hsv2rgb(). The RMT encoder is now internal to ws2812.cpp. Also adds a top-level Makefile wrapping idf.py for Linux, macOS and Windows, and a .gitignore for build output. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
4 lines
161 B
CMake
4 lines
161 B
CMake
idf_component_register(SRCS "main.cpp" "ws2812.cpp"
|
|
PRIV_REQUIRES esp_driver_rmt esp_driver_gpio
|
|
INCLUDE_DIRS ".")
|