Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make fastled configurable via command-line defines #1649

Merged
merged 1 commit into from
May 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions main/config_FASTLED.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,19 @@ extern void MQTTtoFASTLED(char*, JsonObject&);
#define subjectGTWFASTLEDtoMQTT "/FASTLEDtoMQTT" //same color on all LEDs in #RRGGBB

// How many leds in your strip?
#define FASTLED_NUM_LEDS 16
#ifndef FASTLED_NUM_LEDS
# define FASTLED_NUM_LEDS 16
#endif

// Uncomment/edit one of the following lines for your LEDs arrangement.

#ifndef FASTLED_TYPE
//#define FASTLED_TYPE TM1803
//#define FASTLED_TYPE TM1804
//#define FASTLED_TYPE TM1809
//#define FASTLED_TYPE WS2811
//#define FASTLED_TYPE WS2812
//#define FASTLED_TYPE WS2812B
#define FASTLED_TYPE NEOPIXEL
# define FASTLED_TYPE NEOPIXEL
//#define FASTLED_TYPE APA104
//#define FASTLED_TYPE UCS1903
//#define FASTLED_TYPE UCS1903B
Expand All @@ -66,6 +68,7 @@ extern void MQTTtoFASTLED(char*, JsonObject&);
//#define FASTLED_TYPE P9813, DATA_GPIO, CLOCK_GPIO, RGB>(leds, NUM_LEDS);
//#define FASTLED_TYPE APA102, DATA_GPIO, CLOCK_GPIO, RGB>(leds, NUM_LEDS);
//#define FASTLED_TYPE DOTSTAR, DATA_GPIO, CLOCK_GPIO, RGB>(leds, NUM_LEDS);
#endif

// For led chips like Neopixels, which have a data line, ground, and power, you just
// need to define DATA_GPIO. For led chipsets that are SPI based (four wires - data, clock,
Expand All @@ -80,11 +83,19 @@ extern void MQTTtoFASTLED(char*, JsonObject&);
# define FASTLED_DATA_GPIO D2 // only D2 works by me
//#define FASTLED_CLOCK_GPIO 13
#elif ESP32
# define FASTLED_DATA_GPIO 16
# define FASTLED_CLOCK_GPIO 13
# ifndef FASTLED_DATA_GPIO
# define FASTLED_DATA_GPIO 16
# endif
# ifndef FASTLED_CLOCK_GPIO
# define FASTLED_CLOCK_GPIO 13
# endif
#else
# define FASTLED_DATA_GPIO 10
# define FASTLED_CLOCK_GPIO 13
# ifndef FASTLED_DATA_GPIO
# define FASTLED_DATA_GPIO 10
# endif
# ifndef FASTLED_CLOCK_GPIO
# define FASTLED_CLOCK_GPIO 13
# endif
#endif

#endif