From a2cb0a3d5492c4b2224f50cde995b46c2f1c8141 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 11 Apr 2017 07:31:33 -0500 Subject: [PATCH 1/6] Use multiply for delta probe constraint --- Marlin/Marlin_main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 513fde8484..dc9225833a 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -5692,8 +5692,8 @@ inline void gcode_M42() { // If we have gone out too far, we can do a simple fix and scale the numbers // back in closer to the origin. while (HYPOT(X_current, Y_current) > DELTA_PROBEABLE_RADIUS) { - X_current /= 1.25; - Y_current /= 1.25; + X_current *= 0.8; + Y_current *= 0.8; if (verbose_level > 3) { SERIAL_ECHOPAIR("Pulling point towards center:", X_current); SERIAL_ECHOLNPAIR(", ", Y_current); From 53e6c33c37107cc968b31f28bd5b2184cbdcc740 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 11 Apr 2017 08:33:23 -0500 Subject: [PATCH 2/6] 2 is DXC_DUPLICATION_MODE --- Marlin/Marlin_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index dc9225833a..17f461f871 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -8266,7 +8266,7 @@ inline void gcode_M503() { inline void gcode_M605() { stepper.synchronize(); - extruder_duplication_enabled = code_seen('S') && code_value_int() == 2; + extruder_duplication_enabled = code_seen('S') && code_value_int() == (int)DXC_DUPLICATION_MODE; SERIAL_ECHO_START; SERIAL_ECHOLNPAIR(MSG_DUPLICATION_MODE, extruder_duplication_enabled ? MSG_ON : MSG_OFF); } From 36bda2badea82afe94e852c9f9f4ba2ede22aa4d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 9 Apr 2017 11:12:08 -0500 Subject: [PATCH 3/6] Add HAS_RESUME_CONTINUE shorthand macro --- Marlin/Conditionals_LCD.h | 1 + Marlin/Marlin.h | 2 +- Marlin/Marlin_main.cpp | 10 +++++----- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Marlin/Conditionals_LCD.h b/Marlin/Conditionals_LCD.h index 511cb019ea..4b23ea3e9d 100644 --- a/Marlin/Conditionals_LCD.h +++ b/Marlin/Conditionals_LCD.h @@ -385,5 +385,6 @@ #endif #define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)) + #define HAS_RESUME_CONTINUE (ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER)) #endif //CONDITIONALS_LCD_H diff --git a/Marlin/Marlin.h b/Marlin/Marlin.h index 122a3547a4..159745b7f3 100644 --- a/Marlin/Marlin.h +++ b/Marlin/Marlin.h @@ -221,7 +221,7 @@ extern bool axis_known_position[XYZ]; // axis[n].is_known extern bool axis_homed[XYZ]; // axis[n].is_homed extern volatile bool wait_for_heatup; -#if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL) +#if HAS_RESUME_CONTINUE extern volatile bool wait_for_user; #endif diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 17f461f871..86f5e3b3c7 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -443,7 +443,7 @@ static bool relative_mode = false; volatile bool wait_for_heatup = true; // For M0/M1, this flag may be cleared (by M108) to exit the wait-for-user loop -#if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL) +#if HAS_RESUME_CONTINUE volatile bool wait_for_user = false; #endif @@ -4967,7 +4967,7 @@ inline void gcode_G92() { report_current_position(); } -#if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL) +#if HAS_RESUME_CONTINUE /** * M0: Unconditional stop - Wait for user button press on LCD @@ -5504,7 +5504,7 @@ inline void gcode_M42() { pin_state[pin - first_pin] = digitalRead(pin); } - #if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL) + #if HAS_RESUME_CONTINUE wait_for_user = true; #endif @@ -5522,7 +5522,7 @@ inline void gcode_M42() { } } - #if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL) + #if HAS_RESUME_CONTINUE if (!wait_for_user) break; #endif @@ -9139,7 +9139,7 @@ void process_next_command() { break; case 'M': switch (codenum) { - #if ENABLED(ULTIPANEL) || ENABLED(EMERGENCY_PARSER) + #if HAS_RESUME_CONTINUE case 0: // M0: Unconditional stop - Wait for user button press on LCD case 1: // M1: Conditional stop - Wait for user button press on LCD gcode_M0_M1(); From c7063eb55ceaabe419ee64e304a1e4e7b9b60227 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 8 Apr 2017 20:45:06 -0500 Subject: [PATCH 4/6] theTarget => target_temp --- Marlin/Marlin_main.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 86f5e3b3c7..7500abac57 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -6077,7 +6077,7 @@ inline void gcode_M109() { #define TEMP_CONDITIONS (wants_to_cool ? thermalManager.isCoolingHotend(target_extruder) : thermalManager.isHeatingHotend(target_extruder)) #endif - float theTarget = -1.0, old_temp = 9999.0; + float target_temp = -1.0, old_temp = 9999.0; bool wants_to_cool = false; wait_for_heatup = true; millis_t now, next_temp_ms = 0, next_cool_check_ms = 0; @@ -6086,9 +6086,9 @@ inline void gcode_M109() { do { // Target temperature might be changed during the loop - if (theTarget != thermalManager.degTargetHotend(target_extruder)) { + if (target_temp != thermalManager.degTargetHotend(target_extruder)) { wants_to_cool = thermalManager.isCoolingHotend(target_extruder); - theTarget = thermalManager.degTargetHotend(target_extruder); + target_temp = thermalManager.degTargetHotend(target_extruder); // Exit if S, continue if S, R, or R if (no_wait_for_cooling && wants_to_cool) break; @@ -6115,11 +6115,11 @@ inline void gcode_M109() { idle(); refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out - float temp = thermalManager.degHotend(target_extruder); + const float temp = thermalManager.degHotend(target_extruder); #if TEMP_RESIDENCY_TIME > 0 - float temp_diff = fabs(theTarget - temp); + const float temp_diff = fabs(target_temp - temp); if (!residency_start_ms) { // Start the TEMP_RESIDENCY_TIME timer when we reach target temp for the first time. @@ -6186,7 +6186,7 @@ inline void gcode_M109() { #define TEMP_BED_CONDITIONS (wants_to_cool ? thermalManager.isCoolingBed() : thermalManager.isHeatingBed()) #endif - float theTarget = -1.0, old_temp = 9999.0; + float target_temp = -1.0, old_temp = 9999.0; bool wants_to_cool = false; wait_for_heatup = true; millis_t now, next_temp_ms = 0, next_cool_check_ms = 0; @@ -6197,9 +6197,9 @@ inline void gcode_M109() { do { // Target temperature might be changed during the loop - if (theTarget != thermalManager.degTargetBed()) { + if (target_temp != thermalManager.degTargetBed()) { wants_to_cool = thermalManager.isCoolingBed(); - theTarget = thermalManager.degTargetBed(); + target_temp = thermalManager.degTargetBed(); // Exit if S, continue if S, R, or R if (no_wait_for_cooling && wants_to_cool) break; @@ -6226,11 +6226,11 @@ inline void gcode_M109() { idle(); refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out - float temp = thermalManager.degBed(); + const float temp = thermalManager.degBed(); #if TEMP_BED_RESIDENCY_TIME > 0 - float temp_diff = fabs(theTarget - temp); + const float temp_diff = fabs(target_temp - temp); if (!residency_start_ms) { // Start the TEMP_BED_RESIDENCY_TIME timer when we reach target temp for the first time. From e7746ffee4e6cf47b38f5e424cd38ed1ccb88d97 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 4 Apr 2017 16:26:30 -0500 Subject: [PATCH 5/6] Extend RGB LED support, adding Printer Events --- Marlin/Conditionals_LCD.h | 1 + Marlin/Configuration.h | 33 ++++++- Marlin/Marlin_main.cpp | 97 ++++++++++++++----- Marlin/SanityCheck.h | 2 + .../Cartesio/Configuration.h | 33 ++++++- .../Felix/Configuration.h | 33 ++++++- .../Felix/DUAL/Configuration.h | 33 ++++++- .../Hephestos/Configuration.h | 33 ++++++- .../Hephestos_2/Configuration.h | 33 ++++++- .../K8200/Configuration.h | 33 ++++++- .../K8400/Configuration.h | 33 ++++++- .../K8400/Dual-head/Configuration.h | 33 ++++++- .../RepRapWorld/Megatronics/Configuration.h | 33 ++++++- .../RigidBot/Configuration.h | 33 ++++++- .../SCARA/Configuration.h | 33 ++++++- .../TAZ4/Configuration.h | 33 ++++++- .../TinyBoy2/Configuration.h | 33 ++++++- .../WITBOX/Configuration.h | 33 ++++++- .../adafruit/ST7565/Configuration.h | 33 ++++++- .../delta/flsun_kossel_mini/Configuration.h | 33 ++++++- .../delta/generic/Configuration.h | 33 ++++++- .../delta/kossel_mini/Configuration.h | 33 ++++++- .../delta/kossel_pro/Configuration.h | 33 ++++++- .../delta/kossel_xl/Configuration.h | 33 ++++++- .../makibox/Configuration.h | 33 ++++++- .../tvrrug/Round2/Configuration.h | 33 ++++++- 26 files changed, 812 insertions(+), 47 deletions(-) diff --git a/Marlin/Conditionals_LCD.h b/Marlin/Conditionals_LCD.h index 4b23ea3e9d..356a61bbec 100644 --- a/Marlin/Conditionals_LCD.h +++ b/Marlin/Conditionals_LCD.h @@ -386,5 +386,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)) #endif //CONDITIONALS_LCD_H diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index e17a2db8a0..4152d7d33e 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1514,7 +1514,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1522,6 +1538,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 7500abac57..64c0bbe368 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -945,6 +945,31 @@ void servo_init() { #endif +#if HAS_COLOR_LEDS + + void set_led_color(const uint8_t r, const uint8_t g, const uint8_t b) { + + #if ENABLED(BLINKM) + + // This variant uses i2c to send the RGB components to the device. + SendColors(r, g, b); + + #else + + // This variant uses 3 separate pins for the RGB components. + // If the pins can do PWM then their intensity will be set. + digitalWrite(RGB_LED_R_PIN, r ? HIGH : LOW); + digitalWrite(RGB_LED_G_PIN, g ? HIGH : LOW); + digitalWrite(RGB_LED_B_PIN, b ? HIGH : LOW); + analogWrite(RGB_LED_R_PIN, r); + analogWrite(RGB_LED_G_PIN, g); + analogWrite(RGB_LED_B_PIN, b); + + #endif + } + +#endif // HAS_COLOR_LEDS + void gcode_line_error(const char* err, bool doFlush = true) { SERIAL_ERROR_START; serialprintPGM(err); @@ -1129,6 +1154,19 @@ inline void get_serial_commands() { if (card_eof) { SERIAL_PROTOCOLLNPGM(MSG_FILE_PRINTED); card.printingHasFinished(); + #if ENABLED(PRINTER_EVENT_LEDS) + LCD_MESSAGEPGM(MSG_INFO_COMPLETED_PRINTS); + set_led_color(0, 255, 0); + #if HAS_RESUME_CONTINUE + KEEPALIVE_STATE(PAUSED_FOR_USER); + wait_for_user = true; + while (wait_for_user) idle(); + KEEPALIVE_STATE(IN_HANDLER); + #else + safe_delay(1000); + #endif + set_led_color(0, 0, 0); + #endif card.checkautostart(true); } else if (n == -1) { @@ -6084,6 +6122,11 @@ inline void gcode_M109() { KEEPALIVE_STATE(NOT_BUSY); + #if ENABLED(PRINTER_EVENT_LEDS) + const float start_temp = thermalManager.degHotend(target_extruder); + uint8_t old_blue = 0; + #endif + do { // Target temperature might be changed during the loop if (target_temp != thermalManager.degTargetHotend(target_extruder)) { @@ -6117,6 +6160,14 @@ inline void gcode_M109() { const float temp = thermalManager.degHotend(target_extruder); + #if ENABLED(PRINTER_EVENT_LEDS) + // 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)); + } + #endif + #if TEMP_RESIDENCY_TIME > 0 const float temp_diff = fabs(target_temp - temp); @@ -6145,7 +6196,12 @@ inline void gcode_M109() { } while (wait_for_heatup && TEMP_CONDITIONS); - if (wait_for_heatup) LCD_MESSAGEPGM(MSG_HEATING_COMPLETE); + if (wait_for_heatup) { + LCD_MESSAGEPGM(MSG_HEATING_COMPLETE); + #if ENABLED(PRINTER_EVENT_LEDS) + set_led_color(255, 255, 255); // Set LEDs ALL WHITE + #endif + } KEEPALIVE_STATE(IN_HANDLER); } @@ -6195,6 +6251,11 @@ inline void gcode_M109() { target_extruder = active_extruder; // for print_heaterstates + #if ENABLED(PRINTER_EVENT_LEDS) + const float start_temp = thermalManager.degBed(); + uint8_t old_red = 255; + #endif + do { // Target temperature might be changed during the loop if (target_temp != thermalManager.degTargetBed()) { @@ -6228,6 +6289,15 @@ inline void gcode_M109() { const float temp = thermalManager.degBed(); + #if ENABLED(PRINTER_EVENT_LEDS) + // 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); + } + } + #endif + #if TEMP_BED_RESIDENCY_TIME > 0 const float temp_diff = fabs(target_temp - temp); @@ -6771,28 +6841,7 @@ inline void gcode_M121() { endstops.enable_globally(false); } #endif // PARK_HEAD_ON_PAUSE -#if ENABLED(BLINKM) || ENABLED(RGB_LED) - - void set_led_color(const uint8_t r, const uint8_t g, const uint8_t b) { - - #if ENABLED(BLINKM) - - // This variant uses i2c to send the RGB components to the device. - SendColors(r, g, b); - - #else - - // This variant uses 3 separate pins for the RGB components. - // If the pins can do PWM then their intensity will be set. - digitalWrite(RGB_LED_R_PIN, r ? HIGH : LOW); - digitalWrite(RGB_LED_G_PIN, g ? HIGH : LOW); - digitalWrite(RGB_LED_B_PIN, b ? HIGH : LOW); - analogWrite(RGB_LED_R_PIN, r); - analogWrite(RGB_LED_G_PIN, g); - analogWrite(RGB_LED_B_PIN, b); - - #endif - } +#if HAS_COLOR_LEDS /** * M150: Set Status LED Color - Use R-U-B for R-G-B @@ -9388,7 +9437,7 @@ void process_next_command() { break; #endif - #if ENABLED(BLINKM) || ENABLED(RGB_LED) + #if HAS_COLOR_LEDS case 150: // M150: Set Status LED Color gcode_M150(); diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index 0a36616d15..3464abe922 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -957,6 +957,8 @@ static_assert(1 >= 0 #elif ENABLED(BLINKM) #error "RGB_LED and BLINKM are currently incompatible (both use M150)." #endif +#elif DISABLED(BLINKM) && ENABLED(PRINTER_EVENT_LEDS) + #error "PRINTER_EVENT_LEDS requires BLINKM or RGB_LED." #endif /** diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index 62d6d8170d..9d2bc2a339 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -1513,7 +1513,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1521,6 +1537,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 71b26a7f1e..2b670d4e04 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -1497,7 +1497,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1505,6 +1521,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas diff --git a/Marlin/example_configurations/Felix/DUAL/Configuration.h b/Marlin/example_configurations/Felix/DUAL/Configuration.h index 59e5faeab2..f5299dea1c 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -1497,7 +1497,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1505,6 +1521,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index fef9f3657a..9b5a049385 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -1505,7 +1505,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1513,6 +1529,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h index 2d4abfda9a..9af69e5786 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -1508,7 +1508,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1516,6 +1532,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 2bebbd6481..747096f6ba 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -1548,7 +1548,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1556,6 +1572,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas diff --git a/Marlin/example_configurations/K8400/Configuration.h b/Marlin/example_configurations/K8400/Configuration.h index 0b95474535..89e4334126 100644 --- a/Marlin/example_configurations/K8400/Configuration.h +++ b/Marlin/example_configurations/K8400/Configuration.h @@ -1514,7 +1514,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1522,6 +1538,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas diff --git a/Marlin/example_configurations/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/K8400/Dual-head/Configuration.h index 63c3036e6d..677ee815d4 100644 --- a/Marlin/example_configurations/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/K8400/Dual-head/Configuration.h @@ -1514,7 +1514,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1522,6 +1538,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas diff --git a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h index f5e44da8ba..48c9ed6190 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -1514,7 +1514,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1522,6 +1538,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index a7f1bb8f2e..0d35e7a519 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -1515,7 +1515,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1523,6 +1539,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index 29352b0dae..fac1e5109f 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -1529,7 +1529,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1537,6 +1553,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index 03100e59c2..9b4d171391 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -1534,7 +1534,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1542,6 +1558,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas diff --git a/Marlin/example_configurations/TinyBoy2/Configuration.h b/Marlin/example_configurations/TinyBoy2/Configuration.h index ce24a344ed..4ac0360691 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration.h @@ -1570,7 +1570,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1578,6 +1594,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 7c69e1b1eb..46dd900e80 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -1505,7 +1505,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1513,6 +1529,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas diff --git a/Marlin/example_configurations/adafruit/ST7565/Configuration.h b/Marlin/example_configurations/adafruit/ST7565/Configuration.h index 55fde5dc67..565d6eeffc 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -1514,7 +1514,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1522,6 +1538,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas diff --git a/Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h b/Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h index 0aeef6f293..add835d340 100644 --- a/Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h @@ -1630,7 +1630,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1638,6 +1654,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas diff --git a/Marlin/example_configurations/delta/generic/Configuration.h b/Marlin/example_configurations/delta/generic/Configuration.h index 6ea0062ada..2ea7d06bdf 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -1616,7 +1616,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1624,6 +1640,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas diff --git a/Marlin/example_configurations/delta/kossel_mini/Configuration.h b/Marlin/example_configurations/delta/kossel_mini/Configuration.h index ebd147e1f1..ddcba6c0d6 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -1612,7 +1612,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1620,6 +1636,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas diff --git a/Marlin/example_configurations/delta/kossel_pro/Configuration.h b/Marlin/example_configurations/delta/kossel_pro/Configuration.h index 39222a3275..15afad44b0 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -1620,7 +1620,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1628,6 +1644,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas diff --git a/Marlin/example_configurations/delta/kossel_xl/Configuration.h b/Marlin/example_configurations/delta/kossel_xl/Configuration.h index f269fe7f4d..d39454e442 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -1627,7 +1627,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1635,6 +1651,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 39faa4ce46..1f642c46f2 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -1517,7 +1517,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1525,6 +1541,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas diff --git a/Marlin/example_configurations/tvrrug/Round2/Configuration.h b/Marlin/example_configurations/tvrrug/Round2/Configuration.h index 9b90db90b0..e51ddf2c67 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -1510,7 +1510,23 @@ //define BlinkM/CyzRgb Support //#define BLINKM -// Support for an RGB LED using 3 separate pins with optional PWM +/** + * RGB LED / LED Strip Control + * + * Enable support for an RGB LED connected to 5V digital pins, or + * an RGB Strip connected to MOSFETs controlled by digital pins. + * + * Adds the M150 command to set the LED (or LED strip) color. + * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of + * luminance values can be set from 0 to 255. + * + * *** CAUTION *** + * LED Strips require a MOFSET Chip between PWM lines and LEDs, + * as the Arduino cannot handle the current the LEDs will require. + * Failure to follow this precaution can destroy your Arduino! + * *** CAUTION *** + * + */ //#define RGB_LED #if ENABLED(RGB_LED) #define RGB_LED_R_PIN 34 @@ -1518,6 +1534,21 @@ #define RGB_LED_B_PIN 35 #endif +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS +#endif + /*********************************************************************\ * R/C SERVO support * Sponsored by TrinityLabs, Reworked by codexmas From dac21ec680b348db8106e13cf202698e6c0dab12 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 11 Apr 2017 12:58:55 -0500 Subject: [PATCH 6/6] Add support for an RGBW LED --- Marlin/Conditionals_LCD.h | 2 +- Marlin/Configuration.h | 6 ++-- Marlin/Marlin_main.cpp | 30 +++++++++++++++---- Marlin/SanityCheck.h | 21 +++++++++---- .../Cartesio/Configuration.h | 6 ++-- .../Felix/Configuration.h | 6 ++-- .../Felix/DUAL/Configuration.h | 6 ++-- .../Hephestos/Configuration.h | 6 ++-- .../Hephestos_2/Configuration.h | 6 ++-- .../K8200/Configuration.h | 6 ++-- .../K8400/Configuration.h | 6 ++-- .../K8400/Dual-head/Configuration.h | 6 ++-- .../RepRapWorld/Megatronics/Configuration.h | 6 ++-- .../RigidBot/Configuration.h | 6 ++-- .../SCARA/Configuration.h | 6 ++-- .../TAZ4/Configuration.h | 6 ++-- .../TinyBoy2/Configuration.h | 6 ++-- .../WITBOX/Configuration.h | 6 ++-- .../adafruit/ST7565/Configuration.h | 6 ++-- .../delta/flsun_kossel_mini/Configuration.h | 6 ++-- .../delta/generic/Configuration.h | 6 ++-- .../delta/kossel_mini/Configuration.h | 6 ++-- .../delta/kossel_pro/Configuration.h | 6 ++-- .../delta/kossel_xl/Configuration.h | 6 ++-- .../makibox/Configuration.h | 6 ++-- .../tvrrug/Round2/Configuration.h | 6 ++-- .../wt150/Configuration.h | 19 +++++++++++- 27 files changed, 150 insertions(+), 60 deletions(-) diff --git a/Marlin/Conditionals_LCD.h b/Marlin/Conditionals_LCD.h index 356a61bbec..d69b1b1ec7 100644 --- a/Marlin/Conditionals_LCD.h +++ b/Marlin/Conditionals_LCD.h @@ -386,6 +386,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)) + #define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)) #endif //CONDITIONALS_LCD_H diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 4152d7d33e..cc57bff662 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -1532,10 +1532,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1549,7 +1551,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 64c0bbe368..1f43b228b1 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -947,7 +947,12 @@ void servo_init() { #if HAS_COLOR_LEDS - void set_led_color(const uint8_t r, const uint8_t g, const uint8_t b) { + 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 + #endif + ) { #if ENABLED(BLINKM) @@ -965,6 +970,11 @@ void servo_init() { analogWrite(RGB_LED_G_PIN, g); analogWrite(RGB_LED_B_PIN, b); + #if ENABLED(RGBW_LED) + digitalWrite(RGB_LED_W_PIN, w ? HIGH : LOW); + analogWrite(RGB_LED_W_PIN, w); + #endif + #endif } @@ -1156,7 +1166,7 @@ inline void get_serial_commands() { card.printingHasFinished(); #if ENABLED(PRINTER_EVENT_LEDS) LCD_MESSAGEPGM(MSG_INFO_COMPLETED_PRINTS); - set_led_color(0, 255, 0); + set_led_color(0, 255, 0); // Green #if HAS_RESUME_CONTINUE KEEPALIVE_STATE(PAUSED_FOR_USER); wait_for_user = true; @@ -1165,7 +1175,7 @@ inline void get_serial_commands() { #else safe_delay(1000); #endif - set_led_color(0, 0, 0); + set_led_color(0, 0, 0); // OFF #endif card.checkautostart(true); } @@ -6199,7 +6209,11 @@ inline void gcode_M109() { if (wait_for_heatup) { LCD_MESSAGEPGM(MSG_HEATING_COMPLETE); #if ENABLED(PRINTER_EVENT_LEDS) - set_led_color(255, 255, 255); // Set LEDs ALL WHITE + #if ENABLED(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 + #endif #endif } @@ -6844,9 +6858,9 @@ inline void gcode_M121() { endstops.enable_globally(false); } #if HAS_COLOR_LEDS /** - * M150: Set Status LED Color - Use R-U-B for R-G-B + * M150: Set Status LED Color - Use R-U-B-W for R-G-B-W * - * Always sets all 3 components. If a component is left out, set to 0. + * Always sets all 3 or 4 components. If a component is left out, set to 0. * * Examples: * @@ -6854,6 +6868,7 @@ inline void gcode_M121() { endstops.enable_globally(false); } * M150 R255 U127 ; Turn LED orange (PWM only) * M150 ; Turn LED off * M150 R U B ; Turn LED white + * M150 W ; Turn LED white using a white LED * */ inline void gcode_M150() { @@ -6861,6 +6876,9 @@ inline void gcode_M121() { endstops.enable_globally(false); } code_seen('R') ? (code_has_value() ? code_value_byte() : 255) : 0, code_seen('U') ? (code_has_value() ? code_value_byte() : 255) : 0, code_seen('B') ? (code_has_value() ? code_value_byte() : 255) : 0 + #if ENABLED(RGBW_LED) + , code_seen('W') ? (code_has_value() ? code_value_byte() : 255) : 0 + #endif ); } diff --git a/Marlin/SanityCheck.h b/Marlin/SanityCheck.h index 3464abe922..b2e271aa17 100644 --- a/Marlin/SanityCheck.h +++ b/Marlin/SanityCheck.h @@ -34,10 +34,10 @@ #endif /** - * We try our best to include sanity checks for all the changes configuration - * directives because people have a tendency to use outdated config files with - * the bleding edge source code, but sometimes this is not enough. This check - * will force a minimum config file revision, otherwise Marlin will not build. + * We try our best to include sanity checks for all changed configuration + * directives because users have a tendency to use outdated config files with + * the bleeding-edge source code, but sometimes this is not enough. This check + * forces a minimum config file revision. Otherwise Marlin will not build. */ #if ! defined(CONFIGURATION_H_VERSION) || CONFIGURATION_H_VERSION < REQUIRED_CONFIGURATION_H_VERSION #error "You are using an old Configuration.h file, update it before building Marlin." @@ -951,14 +951,23 @@ static_assert(1 >= 0 /** * RGB_LED Requirements */ +#define _RGB_TEST (PIN_EXISTS(RGB_LED_R) && PIN_EXISTS(RGB_LED_G) && PIN_EXISTS(RGB_LED_B)) #if ENABLED(RGB_LED) - #if !(PIN_EXISTS(RGB_LED_R) && PIN_EXISTS(RGB_LED_G) && PIN_EXISTS(RGB_LED_B)) + #if !_RGB_TEST #error "RGB_LED requires RGB_LED_R_PIN, RGB_LED_G_PIN, and RGB_LED_B_PIN." + #elif ENABLED(RGBW_LED) + #error "Please enable only one of RGB_LED and RGBW_LED." #elif ENABLED(BLINKM) #error "RGB_LED and BLINKM are currently incompatible (both use M150)." #endif +#elif ENABLED(RGBW_LED) + #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." + #elif ENABLED(BLINKM) + #error "RGBW_LED and BLINKM are currently incompatible (both use M150)." + #endif #elif DISABLED(BLINKM) && ENABLED(PRINTER_EVENT_LEDS) - #error "PRINTER_EVENT_LEDS requires BLINKM or RGB_LED." + #error "PRINTER_EVENT_LEDS requires BLINKM, RGB_LED, or RGBW_LED." #endif /** diff --git a/Marlin/example_configurations/Cartesio/Configuration.h b/Marlin/example_configurations/Cartesio/Configuration.h index 9d2bc2a339..6a2382fa46 100644 --- a/Marlin/example_configurations/Cartesio/Configuration.h +++ b/Marlin/example_configurations/Cartesio/Configuration.h @@ -1531,10 +1531,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1548,7 +1550,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/Felix/Configuration.h b/Marlin/example_configurations/Felix/Configuration.h index 2b670d4e04..f7cf0e3241 100644 --- a/Marlin/example_configurations/Felix/Configuration.h +++ b/Marlin/example_configurations/Felix/Configuration.h @@ -1515,10 +1515,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1532,7 +1534,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(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 f5299dea1c..96b9eb19c8 100644 --- a/Marlin/example_configurations/Felix/DUAL/Configuration.h +++ b/Marlin/example_configurations/Felix/DUAL/Configuration.h @@ -1515,10 +1515,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1532,7 +1534,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/Hephestos/Configuration.h b/Marlin/example_configurations/Hephestos/Configuration.h index 9b5a049385..5488cf6e7c 100644 --- a/Marlin/example_configurations/Hephestos/Configuration.h +++ b/Marlin/example_configurations/Hephestos/Configuration.h @@ -1523,10 +1523,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1540,7 +1542,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/Hephestos_2/Configuration.h b/Marlin/example_configurations/Hephestos_2/Configuration.h index 9af69e5786..277bf53645 100644 --- a/Marlin/example_configurations/Hephestos_2/Configuration.h +++ b/Marlin/example_configurations/Hephestos_2/Configuration.h @@ -1526,10 +1526,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1543,7 +1545,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/K8200/Configuration.h b/Marlin/example_configurations/K8200/Configuration.h index 747096f6ba..be48f771d3 100644 --- a/Marlin/example_configurations/K8200/Configuration.h +++ b/Marlin/example_configurations/K8200/Configuration.h @@ -1566,10 +1566,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1583,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/K8400/Configuration.h b/Marlin/example_configurations/K8400/Configuration.h index 89e4334126..9456590004 100644 --- a/Marlin/example_configurations/K8400/Configuration.h +++ b/Marlin/example_configurations/K8400/Configuration.h @@ -1532,10 +1532,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1549,7 +1551,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/K8400/Dual-head/Configuration.h b/Marlin/example_configurations/K8400/Dual-head/Configuration.h index 677ee815d4..4a4d29dc13 100644 --- a/Marlin/example_configurations/K8400/Dual-head/Configuration.h +++ b/Marlin/example_configurations/K8400/Dual-head/Configuration.h @@ -1532,10 +1532,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1549,7 +1551,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(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 48c9ed6190..6b521ff03a 100644 --- a/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h +++ b/Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h @@ -1532,10 +1532,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1549,7 +1551,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/RigidBot/Configuration.h b/Marlin/example_configurations/RigidBot/Configuration.h index 0d35e7a519..b5b3363169 100644 --- a/Marlin/example_configurations/RigidBot/Configuration.h +++ b/Marlin/example_configurations/RigidBot/Configuration.h @@ -1533,10 +1533,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1550,7 +1552,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/SCARA/Configuration.h b/Marlin/example_configurations/SCARA/Configuration.h index fac1e5109f..b116d9f9ab 100644 --- a/Marlin/example_configurations/SCARA/Configuration.h +++ b/Marlin/example_configurations/SCARA/Configuration.h @@ -1547,10 +1547,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1564,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/TAZ4/Configuration.h b/Marlin/example_configurations/TAZ4/Configuration.h index 9b4d171391..4960cf1d5c 100644 --- a/Marlin/example_configurations/TAZ4/Configuration.h +++ b/Marlin/example_configurations/TAZ4/Configuration.h @@ -1552,10 +1552,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1569,7 +1571,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/TinyBoy2/Configuration.h b/Marlin/example_configurations/TinyBoy2/Configuration.h index 4ac0360691..8fce9fa979 100644 --- a/Marlin/example_configurations/TinyBoy2/Configuration.h +++ b/Marlin/example_configurations/TinyBoy2/Configuration.h @@ -1588,10 +1588,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1605,7 +1607,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/WITBOX/Configuration.h b/Marlin/example_configurations/WITBOX/Configuration.h index 46dd900e80..ffa1fe60ab 100644 --- a/Marlin/example_configurations/WITBOX/Configuration.h +++ b/Marlin/example_configurations/WITBOX/Configuration.h @@ -1523,10 +1523,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1540,7 +1542,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(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 565d6eeffc..eaf532eb26 100644 --- a/Marlin/example_configurations/adafruit/ST7565/Configuration.h +++ b/Marlin/example_configurations/adafruit/ST7565/Configuration.h @@ -1532,10 +1532,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1549,7 +1551,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(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 add835d340..d66f45e2f0 100644 --- a/Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h @@ -1648,10 +1648,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1665,7 +1667,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(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 2ea7d06bdf..4716101a37 100644 --- a/Marlin/example_configurations/delta/generic/Configuration.h +++ b/Marlin/example_configurations/delta/generic/Configuration.h @@ -1634,10 +1634,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1651,7 +1653,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(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 ddcba6c0d6..dd3f38b56b 100644 --- a/Marlin/example_configurations/delta/kossel_mini/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_mini/Configuration.h @@ -1630,10 +1630,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1647,7 +1649,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(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 15afad44b0..78717d4283 100644 --- a/Marlin/example_configurations/delta/kossel_pro/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_pro/Configuration.h @@ -1638,10 +1638,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1655,7 +1657,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(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 d39454e442..60610f7dce 100644 --- a/Marlin/example_configurations/delta/kossel_xl/Configuration.h +++ b/Marlin/example_configurations/delta/kossel_xl/Configuration.h @@ -1645,10 +1645,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1662,7 +1664,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/makibox/Configuration.h b/Marlin/example_configurations/makibox/Configuration.h index 1f642c46f2..25090738e9 100644 --- a/Marlin/example_configurations/makibox/Configuration.h +++ b/Marlin/example_configurations/makibox/Configuration.h @@ -1535,10 +1535,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1552,7 +1554,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(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 e51ddf2c67..9fe6a9160f 100644 --- a/Marlin/example_configurations/tvrrug/Round2/Configuration.h +++ b/Marlin/example_configurations/tvrrug/Round2/Configuration.h @@ -1528,10 +1528,12 @@ * */ //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 #endif /** @@ -1545,7 +1547,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) +#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define PRINTER_EVENT_LEDS #endif diff --git a/Marlin/example_configurations/wt150/Configuration.h b/Marlin/example_configurations/wt150/Configuration.h index 5bf1ca45fb..83f517fa63 100644 --- a/Marlin/example_configurations/wt150/Configuration.h +++ b/Marlin/example_configurations/wt150/Configuration.h @@ -1521,10 +1521,27 @@ // Support for an RGB LED using 3 separate pins with optional PWM //#define RGB_LED -#if ENABLED(RGB_LED) +//#define RGBW_LED +#if ENABLED(RGB_LED) || ENABLED(RGBW_LED) #define RGB_LED_R_PIN 34 #define RGB_LED_G_PIN 43 #define RGB_LED_B_PIN 35 + #define RGB_LED_W_PIN -1 +#endif + +/** + * Printer Event LEDs + * + * During printing, the LEDs will reflect the printer status: + * + * - Gradually change from blue to violet as the heated bed gets to target temp + * - Gradually change from violet to red as the hotend gets to temperature + * - Change to white to illuminate work surface + * - 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) + #define PRINTER_EVENT_LEDS #endif /*********************************************************************\