From 24e4105b25b759525411dbaa5079f5fe1066129a Mon Sep 17 00:00:00 2001 From: fz Date: Sat, 28 Jun 2025 15:37:47 +0200 Subject: [PATCH] configure for led strip SK6812 --- open-led-race/olr-settings.h | 9 +++++++++ open-led-race/open-led-race.ino | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/open-led-race/olr-settings.h b/open-led-race/olr-settings.h index c654973..352c4c8 100644 --- a/open-led-race/olr-settings.h +++ b/open-led-race/olr-settings.h @@ -33,6 +33,15 @@ extern "C"{ // | PIN_LED |>---->[R 500 ohms]----->| DI (data in - usually Green cable) | // \_________/ \___________________________________/ // +// __________________________LED Strip SK6812 (RGBW)______________________ // +// +// _______ __ ____[SK6812 LED Strip connector]____ +// |__Arduino_ | | | +// | +5V |>---------------------->| V+ (usually Red cable) | +// | GND |>---------------------->| GND (usually White/Black cable) | +// | PIN_LED |>---->[R 500 ohms]----->| DI (data in - usually Green cable) | +// \_________/ \__________________________________/ +// // __________________________Loudspeaker___________________________________ // // // ___________ _____________ diff --git a/open-led-race/open-led-race.ino b/open-led-race/open-led-race.ino index 80ec6e2..d3e9f60 100644 --- a/open-led-race/open-led-race.ino +++ b/open-led-race/open-led-race.ino @@ -107,7 +107,9 @@ void setup() { controller_setup( ); param_load( &tck.cfg ); - track = Adafruit_NeoPixel( tck.cfg.track.nled_total, PIN_LED, NEO_GRB + NEO_KHZ800 ); + // For SK6812 use NEO_RGBW, else NEO_GRB + // (NEO_RGBW for strips with white color leds) + track = Adafruit_NeoPixel( tck.cfg.track.nled_total, PIN_LED, NEO_RGBW + NEO_KHZ800 ); // First 2 controllers always active (Red, Green) race.numcars = 2;