Browse Source

Add support for an RGBW LED

pull/1/head
Scott Lahteine 8 years ago
parent
commit
dac21ec680
  1. 2
      Marlin/Conditionals_LCD.h
  2. 6
      Marlin/Configuration.h
  3. 30
      Marlin/Marlin_main.cpp
  4. 21
      Marlin/SanityCheck.h
  5. 6
      Marlin/example_configurations/Cartesio/Configuration.h
  6. 6
      Marlin/example_configurations/Felix/Configuration.h
  7. 6
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  8. 6
      Marlin/example_configurations/Hephestos/Configuration.h
  9. 6
      Marlin/example_configurations/Hephestos_2/Configuration.h
  10. 6
      Marlin/example_configurations/K8200/Configuration.h
  11. 6
      Marlin/example_configurations/K8400/Configuration.h
  12. 6
      Marlin/example_configurations/K8400/Dual-head/Configuration.h
  13. 6
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  14. 6
      Marlin/example_configurations/RigidBot/Configuration.h
  15. 6
      Marlin/example_configurations/SCARA/Configuration.h
  16. 6
      Marlin/example_configurations/TAZ4/Configuration.h
  17. 6
      Marlin/example_configurations/TinyBoy2/Configuration.h
  18. 6
      Marlin/example_configurations/WITBOX/Configuration.h
  19. 6
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  20. 6
      Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h
  21. 6
      Marlin/example_configurations/delta/generic/Configuration.h
  22. 6
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  23. 6
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  24. 6
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  25. 6
      Marlin/example_configurations/makibox/Configuration.h
  26. 6
      Marlin/example_configurations/tvrrug/Round2/Configuration.h
  27. 19
      Marlin/example_configurations/wt150/Configuration.h

2
Marlin/Conditionals_LCD.h

@ -386,6 +386,6 @@
#define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS)) #define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS))
#define HAS_RESUME_CONTINUE (ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER)) #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 #endif //CONDITIONALS_LCD_H

6
Marlin/Configuration.h

@ -1532,10 +1532,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1549,7 +1551,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

30
Marlin/Marlin_main.cpp

@ -947,7 +947,12 @@ void servo_init() {
#if HAS_COLOR_LEDS #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) #if ENABLED(BLINKM)
@ -965,6 +970,11 @@ void servo_init() {
analogWrite(RGB_LED_G_PIN, g); analogWrite(RGB_LED_G_PIN, g);
analogWrite(RGB_LED_B_PIN, b); 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 #endif
} }
@ -1156,7 +1166,7 @@ inline void get_serial_commands() {
card.printingHasFinished(); card.printingHasFinished();
#if ENABLED(PRINTER_EVENT_LEDS) #if ENABLED(PRINTER_EVENT_LEDS)
LCD_MESSAGEPGM(MSG_INFO_COMPLETED_PRINTS); LCD_MESSAGEPGM(MSG_INFO_COMPLETED_PRINTS);
set_led_color(0, 255, 0); set_led_color(0, 255, 0); // Green
#if HAS_RESUME_CONTINUE #if HAS_RESUME_CONTINUE
KEEPALIVE_STATE(PAUSED_FOR_USER); KEEPALIVE_STATE(PAUSED_FOR_USER);
wait_for_user = true; wait_for_user = true;
@ -1165,7 +1175,7 @@ inline void get_serial_commands() {
#else #else
safe_delay(1000); safe_delay(1000);
#endif #endif
set_led_color(0, 0, 0); set_led_color(0, 0, 0); // OFF
#endif #endif
card.checkautostart(true); card.checkautostart(true);
} }
@ -6199,7 +6209,11 @@ inline void gcode_M109() {
if (wait_for_heatup) { if (wait_for_heatup) {
LCD_MESSAGEPGM(MSG_HEATING_COMPLETE); LCD_MESSAGEPGM(MSG_HEATING_COMPLETE);
#if ENABLED(PRINTER_EVENT_LEDS) #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 #endif
} }
@ -6844,9 +6858,9 @@ inline void gcode_M121() { endstops.enable_globally(false); }
#if HAS_COLOR_LEDS #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: * Examples:
* *
@ -6854,6 +6868,7 @@ inline void gcode_M121() { endstops.enable_globally(false); }
* M150 R255 U127 ; Turn LED orange (PWM only) * M150 R255 U127 ; Turn LED orange (PWM only)
* M150 ; Turn LED off * M150 ; Turn LED off
* M150 R U B ; Turn LED white * M150 R U B ; Turn LED white
* M150 W ; Turn LED white using a white LED
* *
*/ */
inline void gcode_M150() { 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('R') ? (code_has_value() ? code_value_byte() : 255) : 0,
code_seen('U') ? (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 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
); );
} }

21
Marlin/SanityCheck.h

@ -34,10 +34,10 @@
#endif #endif
/** /**
* We try our best to include sanity checks for all the changes configuration * We try our best to include sanity checks for all changed configuration
* directives because people have a tendency to use outdated config files with * directives because users have a tendency to use outdated config files with
* the bleding edge source code, but sometimes this is not enough. This check * the bleeding-edge source code, but sometimes this is not enough. This check
* will force a minimum config file revision, otherwise Marlin will not build. * forces a minimum config file revision. Otherwise Marlin will not build.
*/ */
#if ! defined(CONFIGURATION_H_VERSION) || CONFIGURATION_H_VERSION < REQUIRED_CONFIGURATION_H_VERSION #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." #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 * 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 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." #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) #elif ENABLED(BLINKM)
#error "RGB_LED and BLINKM are currently incompatible (both use M150)." #error "RGB_LED and BLINKM are currently incompatible (both use M150)."
#endif #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) #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 #endif
/** /**

6
Marlin/example_configurations/Cartesio/Configuration.h

@ -1531,10 +1531,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1548,7 +1550,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

6
Marlin/example_configurations/Felix/Configuration.h

@ -1515,10 +1515,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1532,7 +1534,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

6
Marlin/example_configurations/Felix/DUAL/Configuration.h

@ -1515,10 +1515,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1532,7 +1534,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

6
Marlin/example_configurations/Hephestos/Configuration.h

@ -1523,10 +1523,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1540,7 +1542,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

6
Marlin/example_configurations/Hephestos_2/Configuration.h

@ -1526,10 +1526,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1543,7 +1545,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

6
Marlin/example_configurations/K8200/Configuration.h

@ -1566,10 +1566,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1583,7 +1585,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

6
Marlin/example_configurations/K8400/Configuration.h

@ -1532,10 +1532,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1549,7 +1551,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

6
Marlin/example_configurations/K8400/Dual-head/Configuration.h

@ -1532,10 +1532,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1549,7 +1551,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

6
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h

@ -1532,10 +1532,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1549,7 +1551,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

6
Marlin/example_configurations/RigidBot/Configuration.h

@ -1533,10 +1533,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1550,7 +1552,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

6
Marlin/example_configurations/SCARA/Configuration.h

@ -1547,10 +1547,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1564,7 +1566,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

6
Marlin/example_configurations/TAZ4/Configuration.h

@ -1552,10 +1552,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1569,7 +1571,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

6
Marlin/example_configurations/TinyBoy2/Configuration.h

@ -1588,10 +1588,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1605,7 +1607,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

6
Marlin/example_configurations/WITBOX/Configuration.h

@ -1523,10 +1523,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1540,7 +1542,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

6
Marlin/example_configurations/adafruit/ST7565/Configuration.h

@ -1532,10 +1532,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1549,7 +1551,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

6
Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h

@ -1648,10 +1648,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1665,7 +1667,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

6
Marlin/example_configurations/delta/generic/Configuration.h

@ -1634,10 +1634,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1651,7 +1653,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

6
Marlin/example_configurations/delta/kossel_mini/Configuration.h

@ -1630,10 +1630,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1647,7 +1649,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

6
Marlin/example_configurations/delta/kossel_pro/Configuration.h

@ -1638,10 +1638,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1655,7 +1657,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

6
Marlin/example_configurations/delta/kossel_xl/Configuration.h

@ -1645,10 +1645,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1662,7 +1664,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

6
Marlin/example_configurations/makibox/Configuration.h

@ -1535,10 +1535,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1552,7 +1554,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

6
Marlin/example_configurations/tvrrug/Round2/Configuration.h

@ -1528,10 +1528,12 @@
* *
*/ */
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif #endif
/** /**
@ -1545,7 +1547,7 @@
* - Change to green once print has finished * - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button * - 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 #define PRINTER_EVENT_LEDS
#endif #endif

19
Marlin/example_configurations/wt150/Configuration.h

@ -1521,10 +1521,27 @@
// Support for an RGB LED using 3 separate pins with optional PWM // Support for an RGB LED using 3 separate pins with optional PWM
//#define RGB_LED //#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_R_PIN 34
#define RGB_LED_G_PIN 43 #define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35 #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 #endif
/*********************************************************************\ /*********************************************************************\

Loading…
Cancel
Save