From 890e7a16a93241fae148e2647edf5e2c1e15017a Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Thu, 13 Jul 2017 11:01:21 -0400 Subject: [PATCH] Add support for Printrbot Neopixel RGBW strip. Connected as described at http://printrbot.com/shop/led-strip/ Based on patch by Kelly Anderson at http://www.xilka.com/printrbot/marlin/1.1.4/20170707/ --- .travis.yml | 5 ++ Marlin/Conditionals_LCD.h | 2 +- Marlin/Configuration.h | 10 ++- Marlin/Makefile | 6 ++ Marlin/Marlin_main.cpp | 83 +++++++++++++++++-- Marlin/SanityCheck.h | 8 +- .../AlephObjects/TAZ4/Configuration.h | 10 ++- .../AliExpress/CL-260/Configuration.h | 10 ++- .../Anet/A6/Configuration.h | 10 ++- .../Anet/A8/Configuration.h | 10 ++- .../BQ/Hephestos/Configuration.h | 10 ++- .../BQ/Hephestos_2/Configuration.h | 10 ++- .../BQ/WITBOX/Configuration.h | 10 ++- .../Cartesio/Configuration.h | 10 ++- .../Creality/CR-10/Configuration.h | 10 ++- .../Felix/Configuration.h | 10 ++- .../Felix/DUAL/Configuration.h | 10 ++- .../Folger Tech/i3-2020/Configuration.h | 10 ++- .../Infitary/i3-M508/Configuration.h | 10 ++- .../Malyan/M150/Configuration.h | 10 ++- .../RepRapWorld/Megatronics/Configuration.h | 10 ++- .../RigidBot/Configuration.h | 10 ++- .../SCARA/Configuration.h | 10 ++- .../TinyBoy2/Configuration.h | 10 ++- .../Velleman/K8200/Configuration.h | 10 ++- .../Velleman/K8400/Configuration.h | 10 ++- .../Velleman/K8400/Dual-head/Configuration.h | 10 ++- .../adafruit/ST7565/Configuration.h | 10 ++- .../FLSUN/auto_calibrate/Configuration.h | 10 ++- .../delta/FLSUN/kossel_mini/Configuration.h | 10 ++- .../delta/generic/Configuration.h | 10 ++- .../delta/kossel_mini/Configuration.h | 10 ++- .../delta/kossel_pro/Configuration.h | 10 ++- .../delta/kossel_xl/Configuration.h | 10 ++- .../gCreate/gMax1.5+/Configuration.h | 10 ++- .../makibox/Configuration.h | 10 ++- .../tvrrug/Round2/Configuration.h | 10 ++- .../wt150/Configuration.h | 10 ++- 38 files changed, 392 insertions(+), 42 deletions(-) diff --git a/.travis.yml b/.travis.yml index f3ccc3247b..370b4ea26d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,6 +50,10 @@ install: - git clone https://github.com/teemuatlut/TMC2130Stepper.git - sudo mv TMC2130Stepper /usr/local/share/arduino/libraries/TMC2130Stepper # + # Install: Adafruit Neopixel library + - git clone https://github.com/adafruit/Adafruit_NeoPixel.git + - sudo mv Adafruit_NeoPixel /usr/local/share/arduino/libraries/Adafruit_NeoPixel + # before_script: # # Change current working directory to the build dir @@ -80,6 +84,7 @@ script: - opt_set TEMP_SENSOR_1 1 - opt_set TEMP_SENSOR_BED 1 - opt_enable PIDTEMPBED FIX_MOUNTED_PROBE Z_SAFE_HOMING ARC_P_CIRCLES CNC_WORKSPACE_PLANES + - opt_enable BLINKM PCA9632 RGB_LED NEOPIXEL_RGBW_LED - build_marlin # # ...with AUTO_BED_LEVELING_LINEAR, Z_MIN_PROBE_REPEATABILITY_TEST, and DEBUG_LEVELING_FEATURE diff --git a/Marlin/Conditionals_LCD.h b/Marlin/Conditionals_LCD.h index 63be062020..914ef51a6c 100644 --- a/Marlin/Conditionals_LCD.h +++ b/Marlin/Conditionals_LCD.h @@ -430,6 +430,6 @@ #define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)) #define HAS_RESUME_CONTINUE (ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER)) - #define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632)) + #define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED)) #endif // CONDITIONALS_LCD_H diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 08e495e96d..b62f5827fc 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1551,6 +1551,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1562,7 +1570,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/Makefile b/Marlin/Makefile index cabcf30004..eb6ea73b1e 100644 --- a/Marlin/Makefile +++ b/Marlin/Makefile @@ -270,6 +270,9 @@ ifeq ($(WIRE), 1) VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility endif +ifeq ($(NEOPIXEL), 1) +VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Adafruit_NeoPixel +endif ifeq ($(HARDWARE_VARIANT), arduino) HARDWARE_SUB_VARIANT ?= mega @@ -297,6 +300,9 @@ CXXSRC = WMath.cpp WString.cpp Print.cpp Marlin_main.cpp \ watchdog.cpp SPI.cpp servo.cpp Tone.cpp ultralcd.cpp digipot_mcp4451.cpp \ dac_mcp4728.cpp vector_3.cpp least_squares_fit.cpp endstops.cpp stopwatch.cpp utility.cpp \ printcounter.cpp nozzle.cpp serial.cpp +ifeq ($(NEOPIXEL), 1) +CXXSRC += Adafruit_NeoPixel.cpp +endif ifeq ($(LIQUID_TWI2), 0) CXXSRC += LiquidCrystal.cpp else diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 6fa2f144a7..5af9537d11 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -279,6 +279,10 @@ #include "watchdog.h" #endif +#if ENABLED(NEOPIXEL_RGBW_LED) + #include +#endif + #if ENABLED(BLINKM) #include "blinkm.h" #include "Wire.h" @@ -968,13 +972,61 @@ void servo_init() { #if HAS_COLOR_LEDS + #if ENABLED(NEOPIXEL_RGBW_LED) + + Adafruit_NeoPixel pixels(NEOPIXEL_PIXELS, NEOPIXEL_PIN, NEO_GRBW + NEO_KHZ800); + + void set_neopixel_color(const uint32_t color) { + for (uint16_t i = 0; i < pixels.numPixels(); ++i) + pixels.setPixelColor(i, color); + pixels.show(); + } + + void setup_neopixel() { + pixels.setBrightness(255); // 0 - 255 range + pixels.begin(); + pixels.show(); // initialize to all off + + #if ENABLED(NEOPIXEL_STARTUP_TEST) + delay(2000); + set_neopixel_color(pixels.Color(255, 0, 0, 0)); // red + delay(2000); + set_neopixel_color(pixels.Color(0, 255, 0, 0)); // green + delay(2000); + set_neopixel_color(pixels.Color(0, 0, 255, 0)); // blue + delay(2000); + #endif + set_neopixel_color(pixels.Color(0, 0, 0, 255)); // white + } + + #endif // NEOPIXEL_RGBW_LED + void set_led_color( const uint8_t r, const uint8_t g, const uint8_t b - #if ENABLED(RGBW_LED) - , const uint8_t w=0 + #if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_RGBW_LED) + , const uint8_t w = 0 + #if ENABLED(NEOPIXEL_RGBW_LED) + , bool isSequence = false + #endif #endif ) { + #if ENABLED(NEOPIXEL_RGBW_LED) + + const uint32_t color = pixels.Color(r, g, b, w); + static int nextLed = 0; + + if (!isSequence) + set_neopixel_color(color); + else { + pixels.setPixelColor(nextLed, color); + pixels.show(); + if (++nextLed >= pixels.numPixels()) nextLed = 0; + return; + } + + #endif + #if ENABLED(BLINKM) // This variant uses i2c to send the RGB components to the device. @@ -7355,7 +7407,14 @@ inline void gcode_M109() { // Gradually change LED strip from violet to red as nozzle heats up if (!wants_to_cool) { const uint8_t blue = map(constrain(temp, start_temp, target_temp), start_temp, target_temp, 255, 0); - if (blue != old_blue) set_led_color(255, 0, (old_blue = blue)); + if (blue != old_blue) { + old_blue = blue; + set_led_color(255, 0, blue + #if ENABLED(NEOPIXEL_RGBW_LED) + , 0, true + #endif + ); + } } #endif @@ -7390,7 +7449,7 @@ inline void gcode_M109() { if (wait_for_heatup) { LCD_MESSAGEPGM(MSG_HEATING_COMPLETE); #if ENABLED(PRINTER_EVENT_LEDS) - #if ENABLED(RGBW_LED) + #if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_RGBW_LED) set_led_color(0, 0, 0, 255); // Turn on the WHITE LED #else set_led_color(255, 255, 255); // Set LEDs All On @@ -7488,7 +7547,14 @@ inline void gcode_M109() { // Gradually change LED strip from blue to violet as bed heats up if (!wants_to_cool) { const uint8_t red = map(constrain(temp, start_temp, target_temp), start_temp, target_temp, 0, 255); - if (red != old_red) set_led_color((old_red = red), 0, 255); + if (red != old_red) { + old_red = red; + set_led_color(red, 0, 255 + #if ENABLED(NEOPIXEL_RGBW_LED) + , 0, true + #endif + ); + } } #endif @@ -8146,7 +8212,7 @@ inline void gcode_M121() { endstops.enable_globally(false); } parser.seen('R') ? (parser.has_value() ? parser.value_byte() : 255) : 0, parser.seen('U') ? (parser.has_value() ? parser.value_byte() : 255) : 0, parser.seen('B') ? (parser.has_value() ? parser.value_byte() : 255) : 0 - #if ENABLED(RGBW_LED) + #if ENABLED(RGBW_LED) || ENABLED(NEOPIXEL_RGBW_LED) , parser.seen('W') ? (parser.has_value() ? parser.value_byte() : 255) : 0 #endif ); @@ -13072,6 +13138,11 @@ void setup() { OUT_WRITE(STAT_LED_BLUE_PIN, LOW); // turn it off #endif + #if ENABLED(NEOPIXEL_RGBW_LED) + SET_OUTPUT(NEOPIXEL_PIN); + setup_neopixel(); + #endif + #if ENABLED(RGB_LED) || ENABLED(RGBW_LED) SET_OUTPUT(RGB_LED_R_PIN); SET_OUTPUT(RGB_LED_G_PIN); diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index df8bdea5f0..dcd6ba1d5e 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -1056,8 +1056,12 @@ static_assert(1 >= 0 #if !(_RGB_TEST && PIN_EXISTS(RGB_LED_W)) #error "RGBW_LED requires RGB_LED_R_PIN, RGB_LED_G_PIN, RGB_LED_B_PIN, and RGB_LED_W_PIN." #endif -#elif ENABLED(PRINTER_EVENT_LEDS) && DISABLED(BLINKM) && DISABLED(PCA9632) - #error "PRINTER_EVENT_LEDS requires BLINKM, PCA9632, RGB_LED, or RGBW_LED." +#elif ENABLED(NEOPIXEL_RGBW_LED) + #if !(PIN_EXISTS(NEOPIXEL) && NEOPIXEL_PIXELS > 0) + #error "NEOPIXEL_RGBW_LED requires NEOPIXEL_PIN and NEOPIXEL_PIXELS." + #endif +#elif ENABLED(PRINTER_EVENT_LEDS) && DISABLED(BLINKM) && DISABLED(PCA9632) && DISABLED(NEOPIXEL_RGBW_LED) + #error "PRINTER_EVENT_LEDS requires BLINKM, PCA9632, RGB_LED, RGBW_LED or NEOPIXEL_RGBW_LED." #endif /** diff --git a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h index 43b52cdb60..e32b57c588 100644 --- a/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h +++ b/Marlin/example_configurations/AlephObjects/TAZ4/Configuration.h @@ -1566,6 +1566,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1577,7 +1585,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h index e72d15b5a8..769de81ee1 100644 --- a/Marlin/example_configurations/AliExpress/CL-260/Configuration.h +++ b/Marlin/example_configurations/AliExpress/CL-260/Configuration.h @@ -1548,6 +1548,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1559,7 +1567,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/Anet/A6/Configuration.h b/Marlin/example_configurations/Anet/A6/Configuration.h index 93a0ba5641..550fd99535 100644 --- a/Marlin/example_configurations/Anet/A6/Configuration.h +++ b/Marlin/example_configurations/Anet/A6/Configuration.h @@ -1709,6 +1709,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1720,7 +1728,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/Anet/A8/Configuration.h b/Marlin/example_configurations/Anet/A8/Configuration.h index cf307c20a6..d5aadbf2ab 100644 --- a/Marlin/example_configurations/Anet/A8/Configuration.h +++ b/Marlin/example_configurations/Anet/A8/Configuration.h @@ -1558,6 +1558,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1569,7 +1577,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/BQ/Hephestos/Configuration.h b/Marlin/example_configurations/BQ/Hephestos/Configuration.h index c1501dbc25..e55858200f 100644 --- a/Marlin/example_configurations/BQ/Hephestos/Configuration.h +++ b/Marlin/example_configurations/BQ/Hephestos/Configuration.h @@ -1537,6 +1537,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1548,7 +1556,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h index 33d6096545..39af4832d0 100644 --- a/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/BQ/Hephestos_2/Configuration.h @@ -1548,6 +1548,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1559,7 +1567,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/BQ/WITBOX/Configuration.h b/Marlin/example_configurations/BQ/WITBOX/Configuration.h index 97b628a5fe..6984a9be16 100644 --- a/Marlin/example_configurations/BQ/WITBOX/Configuration.h +++ b/Marlin/example_configurations/BQ/WITBOX/Configuration.h @@ -1537,6 +1537,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1548,7 +1556,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index e086f3c96e..91c8d6bf78 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -1545,6 +1545,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1556,7 +1564,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/Creality/CR-10/Configuration.h b/Marlin/example_configurations/Creality/CR-10/Configuration.h index caec496f9c..535eec3268 100644 --- a/Marlin/example_configurations/Creality/CR-10/Configuration.h +++ b/Marlin/example_configurations/Creality/CR-10/Configuration.h @@ -1562,6 +1562,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1573,7 +1581,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 3c83423fd9..fd80205a7b 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -1529,6 +1529,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1540,7 +1548,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index 0153982676..f1e5be4c35 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -1529,6 +1529,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1540,7 +1548,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/Folger Tech/i3-2020/Configuration.h b/Marlin/example_configurations/Folger Tech/i3-2020/Configuration.h index 9efdf996f2..151f76271e 100644 --- a/Marlin/example_configurations/Folger Tech/i3-2020/Configuration.h +++ b/Marlin/example_configurations/Folger Tech/i3-2020/Configuration.h @@ -1551,6 +1551,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1562,7 +1570,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/Infitary/i3-M508/Configuration.h b/Marlin/example_configurations/Infitary/i3-M508/Configuration.h index eadfa6a4db..f29594e423 100644 --- a/Marlin/example_configurations/Infitary/i3-M508/Configuration.h +++ b/Marlin/example_configurations/Infitary/i3-M508/Configuration.h @@ -1555,6 +1555,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1566,7 +1574,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/Malyan/M150/Configuration.h b/Marlin/example_configurations/Malyan/M150/Configuration.h index d3d496eaaf..ac3dcbaf92 100644 --- a/Marlin/example_configurations/Malyan/M150/Configuration.h +++ b/Marlin/example_configurations/Malyan/M150/Configuration.h @@ -1574,6 +1574,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1585,7 +1593,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index c6234d6598..f5f6eba199 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -1547,6 +1547,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1558,7 +1566,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index f8c6e921b5..6c3cb72d12 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -1547,6 +1547,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1558,7 +1566,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index a12b3393f0..71ab77c010 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -1559,6 +1559,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1570,7 +1578,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/TinyBoy2/Configuration.h b/Marlin/example_configurations/TinyBoy2/Configuration.h index cbcd267b08..f41e8a87b6 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration.h @@ -1608,6 +1608,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1619,7 +1627,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/Velleman/K8200/Configuration.h b/Marlin/example_configurations/Velleman/K8200/Configuration.h index dfc27e9764..0683fcbed4 100644 --- a/Marlin/example_configurations/Velleman/K8200/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8200/Configuration.h @@ -1586,6 +1586,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1597,7 +1605,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/Velleman/K8400/Configuration.h b/Marlin/example_configurations/Velleman/K8400/Configuration.h index 65633a7698..fa595b9a74 100644 --- a/Marlin/example_configurations/Velleman/K8400/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8400/Configuration.h @@ -1547,6 +1547,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1558,7 +1566,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h index 16ee469ade..b7ecf8ad3d 100644 --- a/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/Velleman/K8400/Dual-head/Configuration.h @@ -1547,6 +1547,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1558,7 +1566,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 990b095431..cef34701fc 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -1547,6 +1547,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1558,7 +1566,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h index 729a35f2db..c76ed5bf41 100644 --- a/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/auto_calibrate/Configuration.h @@ -1674,6 +1674,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1685,7 +1693,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h index 666a3d7fcf..dd685ced0f 100644 --- a/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/FLSUN/kossel_mini/Configuration.h @@ -1668,6 +1668,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1679,7 +1687,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index d38c7d833c..7919ff832b 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -1658,6 +1658,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1669,7 +1677,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index ccc0820640..0e65048205 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -1661,6 +1661,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1672,7 +1680,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index 14d34aceac..5ed569fd2f 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -1666,6 +1666,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1677,7 +1685,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index b3a3de811a..bca02a2d84 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -1724,6 +1724,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1735,7 +1743,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h index d7404f4782..ec55d2aaae 100644 --- a/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h +++ b/Marlin/example_configurations/gCreate/gMax1.5+/Configuration.h @@ -1563,6 +1563,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1574,7 +1582,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 0c317fc515..37b080d3bc 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -1550,6 +1550,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1561,7 +1569,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index ea2aed618d..54c274207c 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -1542,6 +1542,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1553,7 +1561,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/wt150/Configuration.h b/Marlin/example_configurations/wt150/Configuration.h index e269236201..8cdde10c2d 100644 --- a/Marlin/example_configurations/wt150/Configuration.h +++ b/Marlin/example_configurations/wt150/Configuration.h @@ -1553,6 +1553,14 @@ #define RGB_LED_W_PIN -1 #endif +// Support for Adafruit Neopixel LED driver +//#define NEOPIXEL_RGBW_LED +#if ENABLED(NEOPIXEL_RGBW_LED) + #define NEOPIXEL_PIN 4 // D4 (EXP2-5 on Printrboard) + #define NEOPIXEL_PIXELS 3 + //#define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup +#endif + /** * Printer Event LEDs * @@ -1564,7 +1572,7 @@ * - Change to green once print has finished * - Turn off after the print has finished and the user has pushed a button */ -#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) || ENABLED(PCA9632) || ENABLED(NEOPIXEL_RGBW_LED) #define PRINTER_EVENT_LEDS #endif