Browse Source

Add support for an RGBW LED

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

+ 1
- 1
Marlin/Conditionals_LCD.h View File

@@ -386,6 +386,6 @@
386 386
 
387 387
   #define HAS_SOFTWARE_ENDSTOPS (ENABLED(MIN_SOFTWARE_ENDSTOPS) || ENABLED(MAX_SOFTWARE_ENDSTOPS))
388 388
   #define HAS_RESUME_CONTINUE (ENABLED(NEWPANEL) || ENABLED(EMERGENCY_PARSER))
389
-  #define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED))
389
+  #define HAS_COLOR_LEDS (ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED))
390 390
 
391 391
 #endif //CONDITIONALS_LCD_H

+ 4
- 2
Marlin/Configuration.h View File

@@ -1532,10 +1532,12 @@
1532 1532
  *
1533 1533
  */
1534 1534
 //#define RGB_LED
1535
-#if ENABLED(RGB_LED)
1535
+//#define RGBW_LED
1536
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1536 1537
   #define RGB_LED_R_PIN 34
1537 1538
   #define RGB_LED_G_PIN 43
1538 1539
   #define RGB_LED_B_PIN 35
1540
+  #define RGB_LED_W_PIN -1
1539 1541
 #endif
1540 1542
 
1541 1543
 /**
@@ -1549,7 +1551,7 @@
1549 1551
  *  - Change to green once print has finished
1550 1552
  *  - Turn off after the print has finished and the user has pushed a button
1551 1553
  */
1552
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1554
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1553 1555
   #define PRINTER_EVENT_LEDS
1554 1556
 #endif
1555 1557
 

+ 24
- 6
Marlin/Marlin_main.cpp View File

@@ -947,7 +947,12 @@ void servo_init() {
947 947
 
948 948
 #if HAS_COLOR_LEDS
949 949
 
950
-  void set_led_color(const uint8_t r, const uint8_t g, const uint8_t b) {
950
+  void set_led_color(
951
+    const uint8_t r, const uint8_t g, const uint8_t b
952
+      #if ENABLED(RGBW_LED)
953
+        , const uint8_t w=0
954
+      #endif
955
+  ) {
951 956
 
952 957
     #if ENABLED(BLINKM)
953 958
 
@@ -965,6 +970,11 @@ void servo_init() {
965 970
       analogWrite(RGB_LED_G_PIN, g);
966 971
       analogWrite(RGB_LED_B_PIN, b);
967 972
 
973
+      #if ENABLED(RGBW_LED)
974
+        digitalWrite(RGB_LED_W_PIN, w ? HIGH : LOW);
975
+        analogWrite(RGB_LED_W_PIN, w);
976
+      #endif
977
+
968 978
     #endif
969 979
   }
970 980
 
@@ -1156,7 +1166,7 @@ inline void get_serial_commands() {
1156 1166
           card.printingHasFinished();
1157 1167
           #if ENABLED(PRINTER_EVENT_LEDS)
1158 1168
             LCD_MESSAGEPGM(MSG_INFO_COMPLETED_PRINTS);
1159
-            set_led_color(0, 255, 0);
1169
+            set_led_color(0, 255, 0); // Green
1160 1170
             #if HAS_RESUME_CONTINUE
1161 1171
               KEEPALIVE_STATE(PAUSED_FOR_USER);
1162 1172
               wait_for_user = true;
@@ -1165,7 +1175,7 @@ inline void get_serial_commands() {
1165 1175
             #else
1166 1176
               safe_delay(1000);
1167 1177
             #endif
1168
-            set_led_color(0, 0, 0);
1178
+            set_led_color(0, 0, 0);   // OFF
1169 1179
           #endif
1170 1180
           card.checkautostart(true);
1171 1181
         }
@@ -6199,7 +6209,11 @@ inline void gcode_M109() {
6199 6209
   if (wait_for_heatup) {
6200 6210
     LCD_MESSAGEPGM(MSG_HEATING_COMPLETE);
6201 6211
     #if ENABLED(PRINTER_EVENT_LEDS)
6202
-      set_led_color(255, 255, 255); // Set LEDs ALL WHITE
6212
+      #if ENABLED(RGBW_LED)
6213
+        set_led_color(0, 0, 0, 255);  // Turn on the WHITE LED
6214
+      #else
6215
+        set_led_color(255, 255, 255); // Set LEDs All On
6216
+      #endif
6203 6217
     #endif
6204 6218
   }
6205 6219
 
@@ -6844,9 +6858,9 @@ inline void gcode_M121() { endstops.enable_globally(false); }
6844 6858
 #if HAS_COLOR_LEDS
6845 6859
 
6846 6860
   /**
6847
-   * M150: Set Status LED Color - Use R-U-B for R-G-B
6861
+   * M150: Set Status LED Color - Use R-U-B-W for R-G-B-W
6848 6862
    *
6849
-   * Always sets all 3 components. If a component is left out, set to 0.
6863
+   * Always sets all 3 or 4 components. If a component is left out, set to 0.
6850 6864
    *
6851 6865
    * Examples:
6852 6866
    *
@@ -6854,6 +6868,7 @@ inline void gcode_M121() { endstops.enable_globally(false); }
6854 6868
    *   M150 R255 U127  ; Turn LED orange (PWM only)
6855 6869
    *   M150            ; Turn LED off
6856 6870
    *   M150 R U B      ; Turn LED white
6871
+   *   M150 W          ; Turn LED white using a white LED
6857 6872
    *
6858 6873
    */
6859 6874
   inline void gcode_M150() {
@@ -6861,6 +6876,9 @@ inline void gcode_M121() { endstops.enable_globally(false); }
6861 6876
       code_seen('R') ? (code_has_value() ? code_value_byte() : 255) : 0,
6862 6877
       code_seen('U') ? (code_has_value() ? code_value_byte() : 255) : 0,
6863 6878
       code_seen('B') ? (code_has_value() ? code_value_byte() : 255) : 0
6879
+      #if ENABLED(RGBW_LED)
6880
+        , code_seen('W') ? (code_has_value() ? code_value_byte() : 255) : 0
6881
+      #endif
6864 6882
     );
6865 6883
   }
6866 6884
 

+ 15
- 6
Marlin/SanityCheck.h View File

@@ -34,10 +34,10 @@
34 34
 #endif
35 35
 
36 36
 /**
37
- * We try our best to include sanity checks for all the changes configuration
38
- * directives because people have a tendency to use outdated config files with
39
- * the bleding edge source code, but sometimes this is not enough. This check
40
- * will force a minimum config file revision, otherwise Marlin will not build.
37
+ * We try our best to include sanity checks for all changed configuration
38
+ * directives because users have a tendency to use outdated config files with
39
+ * the bleeding-edge source code, but sometimes this is not enough. This check
40
+ * forces a minimum config file revision. Otherwise Marlin will not build.
41 41
  */
42 42
 #if ! defined(CONFIGURATION_H_VERSION) || CONFIGURATION_H_VERSION < REQUIRED_CONFIGURATION_H_VERSION
43 43
   #error "You are using an old Configuration.h file, update it before building Marlin."
@@ -951,14 +951,23 @@ static_assert(1 >= 0
951 951
 /**
952 952
  * RGB_LED Requirements
953 953
  */
954
+#define _RGB_TEST (PIN_EXISTS(RGB_LED_R) && PIN_EXISTS(RGB_LED_G) && PIN_EXISTS(RGB_LED_B))
954 955
 #if ENABLED(RGB_LED)
955
-  #if !(PIN_EXISTS(RGB_LED_R) && PIN_EXISTS(RGB_LED_G) && PIN_EXISTS(RGB_LED_B))
956
+  #if !_RGB_TEST
956 957
     #error "RGB_LED requires RGB_LED_R_PIN, RGB_LED_G_PIN, and RGB_LED_B_PIN."
958
+  #elif ENABLED(RGBW_LED)
959
+    #error "Please enable only one of RGB_LED and RGBW_LED."
957 960
   #elif ENABLED(BLINKM)
958 961
     #error "RGB_LED and BLINKM are currently incompatible (both use M150)."
959 962
   #endif
963
+#elif ENABLED(RGBW_LED)
964
+  #if !(_RGB_TEST && PIN_EXISTS(RGB_LED_W))
965
+    #error "RGBW_LED requires RGB_LED_R_PIN, RGB_LED_G_PIN, RGB_LED_B_PIN, and RGB_LED_W_PIN."
966
+  #elif ENABLED(BLINKM)
967
+    #error "RGBW_LED and BLINKM are currently incompatible (both use M150)."
968
+  #endif
960 969
 #elif DISABLED(BLINKM) && ENABLED(PRINTER_EVENT_LEDS)
961
-  #error "PRINTER_EVENT_LEDS requires BLINKM or RGB_LED."
970
+  #error "PRINTER_EVENT_LEDS requires BLINKM, RGB_LED, or RGBW_LED."
962 971
 #endif
963 972
 
964 973
 /**

+ 4
- 2
Marlin/example_configurations/Cartesio/Configuration.h View File

@@ -1531,10 +1531,12 @@
1531 1531
  *
1532 1532
  */
1533 1533
 //#define RGB_LED
1534
-#if ENABLED(RGB_LED)
1534
+//#define RGBW_LED
1535
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1535 1536
   #define RGB_LED_R_PIN 34
1536 1537
   #define RGB_LED_G_PIN 43
1537 1538
   #define RGB_LED_B_PIN 35
1539
+  #define RGB_LED_W_PIN -1
1538 1540
 #endif
1539 1541
 
1540 1542
 /**
@@ -1548,7 +1550,7 @@
1548 1550
  *  - Change to green once print has finished
1549 1551
  *  - Turn off after the print has finished and the user has pushed a button
1550 1552
  */
1551
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1553
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1552 1554
   #define PRINTER_EVENT_LEDS
1553 1555
 #endif
1554 1556
 

+ 4
- 2
Marlin/example_configurations/Felix/Configuration.h View File

@@ -1515,10 +1515,12 @@
1515 1515
  *
1516 1516
  */
1517 1517
 //#define RGB_LED
1518
-#if ENABLED(RGB_LED)
1518
+//#define RGBW_LED
1519
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1519 1520
   #define RGB_LED_R_PIN 34
1520 1521
   #define RGB_LED_G_PIN 43
1521 1522
   #define RGB_LED_B_PIN 35
1523
+  #define RGB_LED_W_PIN -1
1522 1524
 #endif
1523 1525
 
1524 1526
 /**
@@ -1532,7 +1534,7 @@
1532 1534
  *  - Change to green once print has finished
1533 1535
  *  - Turn off after the print has finished and the user has pushed a button
1534 1536
  */
1535
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1537
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1536 1538
   #define PRINTER_EVENT_LEDS
1537 1539
 #endif
1538 1540
 

+ 4
- 2
Marlin/example_configurations/Felix/DUAL/Configuration.h View File

@@ -1515,10 +1515,12 @@
1515 1515
  *
1516 1516
  */
1517 1517
 //#define RGB_LED
1518
-#if ENABLED(RGB_LED)
1518
+//#define RGBW_LED
1519
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1519 1520
   #define RGB_LED_R_PIN 34
1520 1521
   #define RGB_LED_G_PIN 43
1521 1522
   #define RGB_LED_B_PIN 35
1523
+  #define RGB_LED_W_PIN -1
1522 1524
 #endif
1523 1525
 
1524 1526
 /**
@@ -1532,7 +1534,7 @@
1532 1534
  *  - Change to green once print has finished
1533 1535
  *  - Turn off after the print has finished and the user has pushed a button
1534 1536
  */
1535
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1537
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1536 1538
   #define PRINTER_EVENT_LEDS
1537 1539
 #endif
1538 1540
 

+ 4
- 2
Marlin/example_configurations/Hephestos/Configuration.h View File

@@ -1523,10 +1523,12 @@
1523 1523
  *
1524 1524
  */
1525 1525
 //#define RGB_LED
1526
-#if ENABLED(RGB_LED)
1526
+//#define RGBW_LED
1527
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1527 1528
   #define RGB_LED_R_PIN 34
1528 1529
   #define RGB_LED_G_PIN 43
1529 1530
   #define RGB_LED_B_PIN 35
1531
+  #define RGB_LED_W_PIN -1
1530 1532
 #endif
1531 1533
 
1532 1534
 /**
@@ -1540,7 +1542,7 @@
1540 1542
  *  - Change to green once print has finished
1541 1543
  *  - Turn off after the print has finished and the user has pushed a button
1542 1544
  */
1543
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1545
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1544 1546
   #define PRINTER_EVENT_LEDS
1545 1547
 #endif
1546 1548
 

+ 4
- 2
Marlin/example_configurations/Hephestos_2/Configuration.h View File

@@ -1526,10 +1526,12 @@
1526 1526
  *
1527 1527
  */
1528 1528
 //#define RGB_LED
1529
-#if ENABLED(RGB_LED)
1529
+//#define RGBW_LED
1530
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1530 1531
   #define RGB_LED_R_PIN 34
1531 1532
   #define RGB_LED_G_PIN 43
1532 1533
   #define RGB_LED_B_PIN 35
1534
+  #define RGB_LED_W_PIN -1
1533 1535
 #endif
1534 1536
 
1535 1537
 /**
@@ -1543,7 +1545,7 @@
1543 1545
  *  - Change to green once print has finished
1544 1546
  *  - Turn off after the print has finished and the user has pushed a button
1545 1547
  */
1546
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1548
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1547 1549
   #define PRINTER_EVENT_LEDS
1548 1550
 #endif
1549 1551
 

+ 4
- 2
Marlin/example_configurations/K8200/Configuration.h View File

@@ -1566,10 +1566,12 @@
1566 1566
  *
1567 1567
  */
1568 1568
 //#define RGB_LED
1569
-#if ENABLED(RGB_LED)
1569
+//#define RGBW_LED
1570
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1570 1571
   #define RGB_LED_R_PIN 34
1571 1572
   #define RGB_LED_G_PIN 43
1572 1573
   #define RGB_LED_B_PIN 35
1574
+  #define RGB_LED_W_PIN -1
1573 1575
 #endif
1574 1576
 
1575 1577
 /**
@@ -1583,7 +1585,7 @@
1583 1585
  *  - Change to green once print has finished
1584 1586
  *  - Turn off after the print has finished and the user has pushed a button
1585 1587
  */
1586
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1588
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1587 1589
   #define PRINTER_EVENT_LEDS
1588 1590
 #endif
1589 1591
 

+ 4
- 2
Marlin/example_configurations/K8400/Configuration.h View File

@@ -1532,10 +1532,12 @@
1532 1532
  *
1533 1533
  */
1534 1534
 //#define RGB_LED
1535
-#if ENABLED(RGB_LED)
1535
+//#define RGBW_LED
1536
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1536 1537
   #define RGB_LED_R_PIN 34
1537 1538
   #define RGB_LED_G_PIN 43
1538 1539
   #define RGB_LED_B_PIN 35
1540
+  #define RGB_LED_W_PIN -1
1539 1541
 #endif
1540 1542
 
1541 1543
 /**
@@ -1549,7 +1551,7 @@
1549 1551
  *  - Change to green once print has finished
1550 1552
  *  - Turn off after the print has finished and the user has pushed a button
1551 1553
  */
1552
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1554
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1553 1555
   #define PRINTER_EVENT_LEDS
1554 1556
 #endif
1555 1557
 

+ 4
- 2
Marlin/example_configurations/K8400/Dual-head/Configuration.h View File

@@ -1532,10 +1532,12 @@
1532 1532
  *
1533 1533
  */
1534 1534
 //#define RGB_LED
1535
-#if ENABLED(RGB_LED)
1535
+//#define RGBW_LED
1536
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1536 1537
   #define RGB_LED_R_PIN 34
1537 1538
   #define RGB_LED_G_PIN 43
1538 1539
   #define RGB_LED_B_PIN 35
1540
+  #define RGB_LED_W_PIN -1
1539 1541
 #endif
1540 1542
 
1541 1543
 /**
@@ -1549,7 +1551,7 @@
1549 1551
  *  - Change to green once print has finished
1550 1552
  *  - Turn off after the print has finished and the user has pushed a button
1551 1553
  */
1552
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1554
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1553 1555
   #define PRINTER_EVENT_LEDS
1554 1556
 #endif
1555 1557
 

+ 4
- 2
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h View File

@@ -1532,10 +1532,12 @@
1532 1532
  *
1533 1533
  */
1534 1534
 //#define RGB_LED
1535
-#if ENABLED(RGB_LED)
1535
+//#define RGBW_LED
1536
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1536 1537
   #define RGB_LED_R_PIN 34
1537 1538
   #define RGB_LED_G_PIN 43
1538 1539
   #define RGB_LED_B_PIN 35
1540
+  #define RGB_LED_W_PIN -1
1539 1541
 #endif
1540 1542
 
1541 1543
 /**
@@ -1549,7 +1551,7 @@
1549 1551
  *  - Change to green once print has finished
1550 1552
  *  - Turn off after the print has finished and the user has pushed a button
1551 1553
  */
1552
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1554
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1553 1555
   #define PRINTER_EVENT_LEDS
1554 1556
 #endif
1555 1557
 

+ 4
- 2
Marlin/example_configurations/RigidBot/Configuration.h View File

@@ -1533,10 +1533,12 @@
1533 1533
  *
1534 1534
  */
1535 1535
 //#define RGB_LED
1536
-#if ENABLED(RGB_LED)
1536
+//#define RGBW_LED
1537
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1537 1538
   #define RGB_LED_R_PIN 34
1538 1539
   #define RGB_LED_G_PIN 43
1539 1540
   #define RGB_LED_B_PIN 35
1541
+  #define RGB_LED_W_PIN -1
1540 1542
 #endif
1541 1543
 
1542 1544
 /**
@@ -1550,7 +1552,7 @@
1550 1552
  *  - Change to green once print has finished
1551 1553
  *  - Turn off after the print has finished and the user has pushed a button
1552 1554
  */
1553
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1555
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1554 1556
   #define PRINTER_EVENT_LEDS
1555 1557
 #endif
1556 1558
 

+ 4
- 2
Marlin/example_configurations/SCARA/Configuration.h View File

@@ -1547,10 +1547,12 @@
1547 1547
  *
1548 1548
  */
1549 1549
 //#define RGB_LED
1550
-#if ENABLED(RGB_LED)
1550
+//#define RGBW_LED
1551
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1551 1552
   #define RGB_LED_R_PIN 34
1552 1553
   #define RGB_LED_G_PIN 43
1553 1554
   #define RGB_LED_B_PIN 35
1555
+  #define RGB_LED_W_PIN -1
1554 1556
 #endif
1555 1557
 
1556 1558
 /**
@@ -1564,7 +1566,7 @@
1564 1566
  *  - Change to green once print has finished
1565 1567
  *  - Turn off after the print has finished and the user has pushed a button
1566 1568
  */
1567
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1569
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1568 1570
   #define PRINTER_EVENT_LEDS
1569 1571
 #endif
1570 1572
 

+ 4
- 2
Marlin/example_configurations/TAZ4/Configuration.h View File

@@ -1552,10 +1552,12 @@
1552 1552
  *
1553 1553
  */
1554 1554
 //#define RGB_LED
1555
-#if ENABLED(RGB_LED)
1555
+//#define RGBW_LED
1556
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1556 1557
   #define RGB_LED_R_PIN 34
1557 1558
   #define RGB_LED_G_PIN 43
1558 1559
   #define RGB_LED_B_PIN 35
1560
+  #define RGB_LED_W_PIN -1
1559 1561
 #endif
1560 1562
 
1561 1563
 /**
@@ -1569,7 +1571,7 @@
1569 1571
  *  - Change to green once print has finished
1570 1572
  *  - Turn off after the print has finished and the user has pushed a button
1571 1573
  */
1572
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1574
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1573 1575
   #define PRINTER_EVENT_LEDS
1574 1576
 #endif
1575 1577
 

+ 4
- 2
Marlin/example_configurations/TinyBoy2/Configuration.h View File

@@ -1588,10 +1588,12 @@
1588 1588
  *
1589 1589
  */
1590 1590
 //#define RGB_LED
1591
-#if ENABLED(RGB_LED)
1591
+//#define RGBW_LED
1592
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1592 1593
   #define RGB_LED_R_PIN 34
1593 1594
   #define RGB_LED_G_PIN 43
1594 1595
   #define RGB_LED_B_PIN 35
1596
+  #define RGB_LED_W_PIN -1
1595 1597
 #endif
1596 1598
 
1597 1599
 /**
@@ -1605,7 +1607,7 @@
1605 1607
  *  - Change to green once print has finished
1606 1608
  *  - Turn off after the print has finished and the user has pushed a button
1607 1609
  */
1608
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1610
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1609 1611
   #define PRINTER_EVENT_LEDS
1610 1612
 #endif
1611 1613
 

+ 4
- 2
Marlin/example_configurations/WITBOX/Configuration.h View File

@@ -1523,10 +1523,12 @@
1523 1523
  *
1524 1524
  */
1525 1525
 //#define RGB_LED
1526
-#if ENABLED(RGB_LED)
1526
+//#define RGBW_LED
1527
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1527 1528
   #define RGB_LED_R_PIN 34
1528 1529
   #define RGB_LED_G_PIN 43
1529 1530
   #define RGB_LED_B_PIN 35
1531
+  #define RGB_LED_W_PIN -1
1530 1532
 #endif
1531 1533
 
1532 1534
 /**
@@ -1540,7 +1542,7 @@
1540 1542
  *  - Change to green once print has finished
1541 1543
  *  - Turn off after the print has finished and the user has pushed a button
1542 1544
  */
1543
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1545
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1544 1546
   #define PRINTER_EVENT_LEDS
1545 1547
 #endif
1546 1548
 

+ 4
- 2
Marlin/example_configurations/adafruit/ST7565/Configuration.h View File

@@ -1532,10 +1532,12 @@
1532 1532
  *
1533 1533
  */
1534 1534
 //#define RGB_LED
1535
-#if ENABLED(RGB_LED)
1535
+//#define RGBW_LED
1536
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1536 1537
   #define RGB_LED_R_PIN 34
1537 1538
   #define RGB_LED_G_PIN 43
1538 1539
   #define RGB_LED_B_PIN 35
1540
+  #define RGB_LED_W_PIN -1
1539 1541
 #endif
1540 1542
 
1541 1543
 /**
@@ -1549,7 +1551,7 @@
1549 1551
  *  - Change to green once print has finished
1550 1552
  *  - Turn off after the print has finished and the user has pushed a button
1551 1553
  */
1552
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1554
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1553 1555
   #define PRINTER_EVENT_LEDS
1554 1556
 #endif
1555 1557
 

+ 4
- 2
Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h View File

@@ -1648,10 +1648,12 @@
1648 1648
  *
1649 1649
  */
1650 1650
 //#define RGB_LED
1651
-#if ENABLED(RGB_LED)
1651
+//#define RGBW_LED
1652
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1652 1653
   #define RGB_LED_R_PIN 34
1653 1654
   #define RGB_LED_G_PIN 43
1654 1655
   #define RGB_LED_B_PIN 35
1656
+  #define RGB_LED_W_PIN -1
1655 1657
 #endif
1656 1658
 
1657 1659
 /**
@@ -1665,7 +1667,7 @@
1665 1667
  *  - Change to green once print has finished
1666 1668
  *  - Turn off after the print has finished and the user has pushed a button
1667 1669
  */
1668
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1670
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1669 1671
   #define PRINTER_EVENT_LEDS
1670 1672
 #endif
1671 1673
 

+ 4
- 2
Marlin/example_configurations/delta/generic/Configuration.h View File

@@ -1634,10 +1634,12 @@
1634 1634
  *
1635 1635
  */
1636 1636
 //#define RGB_LED
1637
-#if ENABLED(RGB_LED)
1637
+//#define RGBW_LED
1638
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1638 1639
   #define RGB_LED_R_PIN 34
1639 1640
   #define RGB_LED_G_PIN 43
1640 1641
   #define RGB_LED_B_PIN 35
1642
+  #define RGB_LED_W_PIN -1
1641 1643
 #endif
1642 1644
 
1643 1645
 /**
@@ -1651,7 +1653,7 @@
1651 1653
  *  - Change to green once print has finished
1652 1654
  *  - Turn off after the print has finished and the user has pushed a button
1653 1655
  */
1654
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1656
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1655 1657
   #define PRINTER_EVENT_LEDS
1656 1658
 #endif
1657 1659
 

+ 4
- 2
Marlin/example_configurations/delta/kossel_mini/Configuration.h View File

@@ -1630,10 +1630,12 @@
1630 1630
  *
1631 1631
  */
1632 1632
 //#define RGB_LED
1633
-#if ENABLED(RGB_LED)
1633
+//#define RGBW_LED
1634
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1634 1635
   #define RGB_LED_R_PIN 34
1635 1636
   #define RGB_LED_G_PIN 43
1636 1637
   #define RGB_LED_B_PIN 35
1638
+  #define RGB_LED_W_PIN -1
1637 1639
 #endif
1638 1640
 
1639 1641
 /**
@@ -1647,7 +1649,7 @@
1647 1649
  *  - Change to green once print has finished
1648 1650
  *  - Turn off after the print has finished and the user has pushed a button
1649 1651
  */
1650
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1652
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1651 1653
   #define PRINTER_EVENT_LEDS
1652 1654
 #endif
1653 1655
 

+ 4
- 2
Marlin/example_configurations/delta/kossel_pro/Configuration.h View File

@@ -1638,10 +1638,12 @@
1638 1638
  *
1639 1639
  */
1640 1640
 //#define RGB_LED
1641
-#if ENABLED(RGB_LED)
1641
+//#define RGBW_LED
1642
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1642 1643
   #define RGB_LED_R_PIN 34
1643 1644
   #define RGB_LED_G_PIN 43
1644 1645
   #define RGB_LED_B_PIN 35
1646
+  #define RGB_LED_W_PIN -1
1645 1647
 #endif
1646 1648
 
1647 1649
 /**
@@ -1655,7 +1657,7 @@
1655 1657
  *  - Change to green once print has finished
1656 1658
  *  - Turn off after the print has finished and the user has pushed a button
1657 1659
  */
1658
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1660
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1659 1661
   #define PRINTER_EVENT_LEDS
1660 1662
 #endif
1661 1663
 

+ 4
- 2
Marlin/example_configurations/delta/kossel_xl/Configuration.h View File

@@ -1645,10 +1645,12 @@
1645 1645
  *
1646 1646
  */
1647 1647
 //#define RGB_LED
1648
-#if ENABLED(RGB_LED)
1648
+//#define RGBW_LED
1649
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1649 1650
   #define RGB_LED_R_PIN 34
1650 1651
   #define RGB_LED_G_PIN 43
1651 1652
   #define RGB_LED_B_PIN 35
1653
+  #define RGB_LED_W_PIN -1
1652 1654
 #endif
1653 1655
 
1654 1656
 /**
@@ -1662,7 +1664,7 @@
1662 1664
  *  - Change to green once print has finished
1663 1665
  *  - Turn off after the print has finished and the user has pushed a button
1664 1666
  */
1665
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1667
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1666 1668
   #define PRINTER_EVENT_LEDS
1667 1669
 #endif
1668 1670
 

+ 4
- 2
Marlin/example_configurations/makibox/Configuration.h View File

@@ -1535,10 +1535,12 @@
1535 1535
  *
1536 1536
  */
1537 1537
 //#define RGB_LED
1538
-#if ENABLED(RGB_LED)
1538
+//#define RGBW_LED
1539
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1539 1540
   #define RGB_LED_R_PIN 34
1540 1541
   #define RGB_LED_G_PIN 43
1541 1542
   #define RGB_LED_B_PIN 35
1543
+  #define RGB_LED_W_PIN -1
1542 1544
 #endif
1543 1545
 
1544 1546
 /**
@@ -1552,7 +1554,7 @@
1552 1554
  *  - Change to green once print has finished
1553 1555
  *  - Turn off after the print has finished and the user has pushed a button
1554 1556
  */
1555
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1557
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1556 1558
   #define PRINTER_EVENT_LEDS
1557 1559
 #endif
1558 1560
 

+ 4
- 2
Marlin/example_configurations/tvrrug/Round2/Configuration.h View File

@@ -1528,10 +1528,12 @@
1528 1528
  *
1529 1529
  */
1530 1530
 //#define RGB_LED
1531
-#if ENABLED(RGB_LED)
1531
+//#define RGBW_LED
1532
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1532 1533
   #define RGB_LED_R_PIN 34
1533 1534
   #define RGB_LED_G_PIN 43
1534 1535
   #define RGB_LED_B_PIN 35
1536
+  #define RGB_LED_W_PIN -1
1535 1537
 #endif
1536 1538
 
1537 1539
 /**
@@ -1545,7 +1547,7 @@
1545 1547
  *  - Change to green once print has finished
1546 1548
  *  - Turn off after the print has finished and the user has pushed a button
1547 1549
  */
1548
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1550
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1549 1551
   #define PRINTER_EVENT_LEDS
1550 1552
 #endif
1551 1553
 

+ 18
- 1
Marlin/example_configurations/wt150/Configuration.h View File

@@ -1521,10 +1521,27 @@
1521 1521
 
1522 1522
 // Support for an RGB LED using 3 separate pins with optional PWM
1523 1523
 //#define RGB_LED
1524
-#if ENABLED(RGB_LED)
1524
+//#define RGBW_LED
1525
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1525 1526
   #define RGB_LED_R_PIN 34
1526 1527
   #define RGB_LED_G_PIN 43
1527 1528
   #define RGB_LED_B_PIN 35
1529
+  #define RGB_LED_W_PIN -1
1530
+#endif
1531
+
1532
+/**
1533
+ * Printer Event LEDs
1534
+ *
1535
+ * During printing, the LEDs will reflect the printer status:
1536
+ *
1537
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1538
+ *  - Gradually change from violet to red as the hotend gets to temperature
1539
+ *  - Change to white to illuminate work surface
1540
+ *  - Change to green once print has finished
1541
+ *  - Turn off after the print has finished and the user has pushed a button
1542
+ */
1543
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1544
+  #define PRINTER_EVENT_LEDS
1528 1545
 #endif
1529 1546
 
1530 1547
 /*********************************************************************\

Loading…
Cancel
Save