Browse Source

Merge pull request #6240 from thinkyhead/rebuild_rgb_led

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

+ 2
- 0
Marlin/Conditionals_LCD.h View File

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

+ 35
- 2
Marlin/Configuration.h View File

@@ -1514,12 +1514,45 @@
1514 1514
 //define BlinkM/CyzRgb Support
1515 1515
 //#define BLINKM
1516 1516
 
1517
-// Support for an RGB LED using 3 separate pins with optional PWM
1517
+/**
1518
+ * RGB LED / LED Strip Control
1519
+ *
1520
+ * Enable support for an RGB LED connected to 5V digital pins, or
1521
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1522
+ *
1523
+ * Adds the M150 command to set the LED (or LED strip) color. 
1524
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1525
+ * luminance values can be set from 0 to 255.
1526
+ *
1527
+ * *** CAUTION ***
1528
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1529
+ *  as the Arduino cannot handle the current the LEDs will require.
1530
+ *  Failure to follow this precaution can destroy your Arduino!
1531
+ * *** CAUTION ***
1532
+ *
1533
+ */
1518 1534
 //#define RGB_LED
1519
-#if ENABLED(RGB_LED)
1535
+//#define RGBW_LED
1536
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1520 1537
   #define RGB_LED_R_PIN 34
1521 1538
   #define RGB_LED_G_PIN 43
1522 1539
   #define RGB_LED_B_PIN 35
1540
+  #define RGB_LED_W_PIN -1
1541
+#endif
1542
+
1543
+/**
1544
+ * Printer Event LEDs
1545
+ *
1546
+ * During printing, the LEDs will reflect the printer status:
1547
+ *
1548
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1549
+ *  - Gradually change from violet to red as the hotend gets to temperature
1550
+ *  - Change to white to illuminate work surface
1551
+ *  - Change to green once print has finished
1552
+ *  - Turn off after the print has finished and the user has pushed a button
1553
+ */
1554
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1555
+  #define PRINTER_EVENT_LEDS
1523 1556
 #endif
1524 1557
 
1525 1558
 /*********************************************************************\

+ 1
- 1
Marlin/Marlin.h View File

@@ -221,7 +221,7 @@ extern bool axis_known_position[XYZ]; // axis[n].is_known
221 221
 extern bool axis_homed[XYZ]; // axis[n].is_homed
222 222
 extern volatile bool wait_for_heatup;
223 223
 
224
-#if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL)
224
+#if HAS_RESUME_CONTINUE
225 225
   extern volatile bool wait_for_user;
226 226
 #endif
227 227
 

+ 111
- 44
Marlin/Marlin_main.cpp View File

@@ -443,7 +443,7 @@ static bool relative_mode = false;
443 443
 volatile bool wait_for_heatup = true;
444 444
 
445 445
 // For M0/M1, this flag may be cleared (by M108) to exit the wait-for-user loop
446
-#if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL)
446
+#if HAS_RESUME_CONTINUE
447 447
   volatile bool wait_for_user = false;
448 448
 #endif
449 449
 
@@ -945,6 +945,41 @@ void servo_init() {
945 945
 
946 946
 #endif
947 947
 
948
+#if HAS_COLOR_LEDS
949
+
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
+  ) {
956
+
957
+    #if ENABLED(BLINKM)
958
+
959
+      // This variant uses i2c to send the RGB components to the device.
960
+      SendColors(r, g, b);
961
+
962
+    #else
963
+
964
+      // This variant uses 3 separate pins for the RGB components.
965
+      // If the pins can do PWM then their intensity will be set.
966
+      digitalWrite(RGB_LED_R_PIN, r ? HIGH : LOW);
967
+      digitalWrite(RGB_LED_G_PIN, g ? HIGH : LOW);
968
+      digitalWrite(RGB_LED_B_PIN, b ? HIGH : LOW);
969
+      analogWrite(RGB_LED_R_PIN, r);
970
+      analogWrite(RGB_LED_G_PIN, g);
971
+      analogWrite(RGB_LED_B_PIN, b);
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
+
978
+    #endif
979
+  }
980
+
981
+#endif // HAS_COLOR_LEDS
982
+
948 983
 void gcode_line_error(const char* err, bool doFlush = true) {
949 984
   SERIAL_ERROR_START;
950 985
   serialprintPGM(err);
@@ -1129,6 +1164,19 @@ inline void get_serial_commands() {
1129 1164
         if (card_eof) {
1130 1165
           SERIAL_PROTOCOLLNPGM(MSG_FILE_PRINTED);
1131 1166
           card.printingHasFinished();
1167
+          #if ENABLED(PRINTER_EVENT_LEDS)
1168
+            LCD_MESSAGEPGM(MSG_INFO_COMPLETED_PRINTS);
1169
+            set_led_color(0, 255, 0); // Green
1170
+            #if HAS_RESUME_CONTINUE
1171
+              KEEPALIVE_STATE(PAUSED_FOR_USER);
1172
+              wait_for_user = true;
1173
+              while (wait_for_user) idle();
1174
+              KEEPALIVE_STATE(IN_HANDLER);
1175
+            #else
1176
+              safe_delay(1000);
1177
+            #endif
1178
+            set_led_color(0, 0, 0);   // OFF
1179
+          #endif
1132 1180
           card.checkautostart(true);
1133 1181
         }
1134 1182
         else if (n == -1) {
@@ -4967,7 +5015,7 @@ inline void gcode_G92() {
4967 5015
   report_current_position();
4968 5016
 }
4969 5017
 
4970
-#if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL)
5018
+#if HAS_RESUME_CONTINUE
4971 5019
 
4972 5020
   /**
4973 5021
    * M0: Unconditional stop - Wait for user button press on LCD
@@ -5504,7 +5552,7 @@ inline void gcode_M42() {
5504 5552
           pin_state[pin - first_pin] = digitalRead(pin);
5505 5553
       }
5506 5554
 
5507
-      #if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL)
5555
+      #if HAS_RESUME_CONTINUE
5508 5556
         wait_for_user = true;
5509 5557
       #endif
5510 5558
 
@@ -5522,7 +5570,7 @@ inline void gcode_M42() {
5522 5570
           }
5523 5571
         }
5524 5572
 
5525
-        #if ENABLED(EMERGENCY_PARSER) || ENABLED(ULTIPANEL)
5573
+        #if HAS_RESUME_CONTINUE
5526 5574
           if (!wait_for_user) break;
5527 5575
         #endif
5528 5576
 
@@ -5692,8 +5740,8 @@ inline void gcode_M42() {
5692 5740
             // If we have gone out too far, we can do a simple fix and scale the numbers
5693 5741
             // back in closer to the origin.
5694 5742
             while (HYPOT(X_current, Y_current) > DELTA_PROBEABLE_RADIUS) {
5695
-              X_current /= 1.25;
5696
-              Y_current /= 1.25;
5743
+              X_current *= 0.8;
5744
+              Y_current *= 0.8;
5697 5745
               if (verbose_level > 3) {
5698 5746
                 SERIAL_ECHOPAIR("Pulling point towards center:", X_current);
5699 5747
                 SERIAL_ECHOLNPAIR(", ", Y_current);
@@ -6077,18 +6125,23 @@ inline void gcode_M109() {
6077 6125
     #define TEMP_CONDITIONS (wants_to_cool ? thermalManager.isCoolingHotend(target_extruder) : thermalManager.isHeatingHotend(target_extruder))
6078 6126
   #endif
6079 6127
 
6080
-  float theTarget = -1.0, old_temp = 9999.0;
6128
+  float target_temp = -1.0, old_temp = 9999.0;
6081 6129
   bool wants_to_cool = false;
6082 6130
   wait_for_heatup = true;
6083 6131
   millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;
6084 6132
 
6085 6133
   KEEPALIVE_STATE(NOT_BUSY);
6086 6134
 
6135
+  #if ENABLED(PRINTER_EVENT_LEDS)
6136
+    const float start_temp = thermalManager.degHotend(target_extruder);
6137
+    uint8_t old_blue = 0;
6138
+  #endif
6139
+
6087 6140
   do {
6088 6141
     // Target temperature might be changed during the loop
6089
-    if (theTarget != thermalManager.degTargetHotend(target_extruder)) {
6142
+    if (target_temp != thermalManager.degTargetHotend(target_extruder)) {
6090 6143
       wants_to_cool = thermalManager.isCoolingHotend(target_extruder);
6091
-      theTarget = thermalManager.degTargetHotend(target_extruder);
6144
+      target_temp = thermalManager.degTargetHotend(target_extruder);
6092 6145
 
6093 6146
       // Exit if S<lower>, continue if S<higher>, R<lower>, or R<higher>
6094 6147
       if (no_wait_for_cooling && wants_to_cool) break;
@@ -6115,11 +6168,19 @@ inline void gcode_M109() {
6115 6168
     idle();
6116 6169
     refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out
6117 6170
 
6118
-    float temp = thermalManager.degHotend(target_extruder);
6171
+    const float temp = thermalManager.degHotend(target_extruder);
6172
+
6173
+    #if ENABLED(PRINTER_EVENT_LEDS)
6174
+      // Gradually change LED strip from violet to red as nozzle heats up
6175
+      if (!wants_to_cool) {
6176
+        const uint8_t blue = map(constrain(temp, start_temp, target_temp), start_temp, target_temp, 255, 0);
6177
+        if (blue != old_blue) set_led_color(255, 0, (old_blue = blue));
6178
+      }
6179
+    #endif
6119 6180
 
6120 6181
     #if TEMP_RESIDENCY_TIME > 0
6121 6182
 
6122
-      float temp_diff = fabs(theTarget - temp);
6183
+      const float temp_diff = fabs(target_temp - temp);
6123 6184
 
6124 6185
       if (!residency_start_ms) {
6125 6186
         // Start the TEMP_RESIDENCY_TIME timer when we reach target temp for the first time.
@@ -6145,7 +6206,16 @@ inline void gcode_M109() {
6145 6206
 
6146 6207
   } while (wait_for_heatup && TEMP_CONDITIONS);
6147 6208
 
6148
-  if (wait_for_heatup) LCD_MESSAGEPGM(MSG_HEATING_COMPLETE);
6209
+  if (wait_for_heatup) {
6210
+    LCD_MESSAGEPGM(MSG_HEATING_COMPLETE);
6211
+    #if ENABLED(PRINTER_EVENT_LEDS)
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
6217
+    #endif
6218
+  }
6149 6219
 
6150 6220
   KEEPALIVE_STATE(IN_HANDLER);
6151 6221
 }
@@ -6186,7 +6256,7 @@ inline void gcode_M109() {
6186 6256
       #define TEMP_BED_CONDITIONS (wants_to_cool ? thermalManager.isCoolingBed() : thermalManager.isHeatingBed())
6187 6257
     #endif
6188 6258
 
6189
-    float theTarget = -1.0, old_temp = 9999.0;
6259
+    float target_temp = -1.0, old_temp = 9999.0;
6190 6260
     bool wants_to_cool = false;
6191 6261
     wait_for_heatup = true;
6192 6262
     millis_t now, next_temp_ms = 0, next_cool_check_ms = 0;
@@ -6195,11 +6265,16 @@ inline void gcode_M109() {
6195 6265
 
6196 6266
     target_extruder = active_extruder; // for print_heaterstates
6197 6267
 
6268
+    #if ENABLED(PRINTER_EVENT_LEDS)
6269
+      const float start_temp = thermalManager.degBed();
6270
+      uint8_t old_red = 255;
6271
+    #endif
6272
+
6198 6273
     do {
6199 6274
       // Target temperature might be changed during the loop
6200
-      if (theTarget != thermalManager.degTargetBed()) {
6275
+      if (target_temp != thermalManager.degTargetBed()) {
6201 6276
         wants_to_cool = thermalManager.isCoolingBed();
6202
-        theTarget = thermalManager.degTargetBed();
6277
+        target_temp = thermalManager.degTargetBed();
6203 6278
 
6204 6279
         // Exit if S<lower>, continue if S<higher>, R<lower>, or R<higher>
6205 6280
         if (no_wait_for_cooling && wants_to_cool) break;
@@ -6226,11 +6301,20 @@ inline void gcode_M109() {
6226 6301
       idle();
6227 6302
       refresh_cmd_timeout(); // to prevent stepper_inactive_time from running out
6228 6303
 
6229
-      float temp = thermalManager.degBed();
6304
+      const float temp = thermalManager.degBed();
6305
+
6306
+      #if ENABLED(PRINTER_EVENT_LEDS)
6307
+        // Gradually change LED strip from blue to violet as bed heats up
6308
+        if (!wants_to_cool) {
6309
+          const uint8_t red = map(constrain(temp, start_temp, target_temp), start_temp, target_temp, 0, 255);
6310
+          if (red != old_red) set_led_color((old_red = red), 0, 255);
6311
+        }
6312
+      }
6313
+      #endif
6230 6314
 
6231 6315
       #if TEMP_BED_RESIDENCY_TIME > 0
6232 6316
 
6233
-        float temp_diff = fabs(theTarget - temp);
6317
+        const float temp_diff = fabs(target_temp - temp);
6234 6318
 
6235 6319
         if (!residency_start_ms) {
6236 6320
           // Start the TEMP_BED_RESIDENCY_TIME timer when we reach target temp for the first time.
@@ -6771,33 +6855,12 @@ inline void gcode_M121() { endstops.enable_globally(false); }
6771 6855
 
6772 6856
 #endif // PARK_HEAD_ON_PAUSE
6773 6857
 
6774
-#if ENABLED(BLINKM) || ENABLED(RGB_LED)
6775
-
6776
-  void set_led_color(const uint8_t r, const uint8_t g, const uint8_t b) {
6777
-
6778
-    #if ENABLED(BLINKM)
6779
-
6780
-      // This variant uses i2c to send the RGB components to the device.
6781
-      SendColors(r, g, b);
6782
-
6783
-    #else
6784
-
6785
-      // This variant uses 3 separate pins for the RGB components.
6786
-      // If the pins can do PWM then their intensity will be set.
6787
-      digitalWrite(RGB_LED_R_PIN, r ? HIGH : LOW);
6788
-      digitalWrite(RGB_LED_G_PIN, g ? HIGH : LOW);
6789
-      digitalWrite(RGB_LED_B_PIN, b ? HIGH : LOW);
6790
-      analogWrite(RGB_LED_R_PIN, r);
6791
-      analogWrite(RGB_LED_G_PIN, g);
6792
-      analogWrite(RGB_LED_B_PIN, b);
6793
-
6794
-    #endif
6795
-  }
6858
+#if HAS_COLOR_LEDS
6796 6859
 
6797 6860
   /**
6798
-   * 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
6799 6862
    *
6800
-   * 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.
6801 6864
    *
6802 6865
    * Examples:
6803 6866
    *
@@ -6805,6 +6868,7 @@ inline void gcode_M121() { endstops.enable_globally(false); }
6805 6868
    *   M150 R255 U127  ; Turn LED orange (PWM only)
6806 6869
    *   M150            ; Turn LED off
6807 6870
    *   M150 R U B      ; Turn LED white
6871
+   *   M150 W          ; Turn LED white using a white LED
6808 6872
    *
6809 6873
    */
6810 6874
   inline void gcode_M150() {
@@ -6812,6 +6876,9 @@ inline void gcode_M121() { endstops.enable_globally(false); }
6812 6876
       code_seen('R') ? (code_has_value() ? code_value_byte() : 255) : 0,
6813 6877
       code_seen('U') ? (code_has_value() ? code_value_byte() : 255) : 0,
6814 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
6815 6882
     );
6816 6883
   }
6817 6884
 
@@ -8266,7 +8333,7 @@ inline void gcode_M503() {
8266 8333
 
8267 8334
   inline void gcode_M605() {
8268 8335
     stepper.synchronize();
8269
-    extruder_duplication_enabled = code_seen('S') && code_value_int() == 2;
8336
+    extruder_duplication_enabled = code_seen('S') && code_value_int() == (int)DXC_DUPLICATION_MODE;
8270 8337
     SERIAL_ECHO_START;
8271 8338
     SERIAL_ECHOLNPAIR(MSG_DUPLICATION_MODE, extruder_duplication_enabled ? MSG_ON : MSG_OFF);
8272 8339
   }
@@ -9139,7 +9206,7 @@ void process_next_command() {
9139 9206
     break;
9140 9207
 
9141 9208
     case 'M': switch (codenum) {
9142
-      #if ENABLED(ULTIPANEL) || ENABLED(EMERGENCY_PARSER)
9209
+      #if HAS_RESUME_CONTINUE
9143 9210
         case 0: // M0: Unconditional stop - Wait for user button press on LCD
9144 9211
         case 1: // M1: Conditional stop - Wait for user button press on LCD
9145 9212
           gcode_M0_M1();
@@ -9388,7 +9455,7 @@ void process_next_command() {
9388 9455
           break;
9389 9456
       #endif
9390 9457
 
9391
-      #if ENABLED(BLINKM) || ENABLED(RGB_LED)
9458
+      #if HAS_COLOR_LEDS
9392 9459
 
9393 9460
         case 150: // M150: Set Status LED Color
9394 9461
           gcode_M150();

+ 16
- 5
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,12 +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
969
+#elif DISABLED(BLINKM) && ENABLED(PRINTER_EVENT_LEDS)
970
+  #error "PRINTER_EVENT_LEDS requires BLINKM, RGB_LED, or RGBW_LED."
960 971
 #endif
961 972
 
962 973
 /**

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

@@ -1513,12 +1513,45 @@
1513 1513
 //define BlinkM/CyzRgb Support
1514 1514
 //#define BLINKM
1515 1515
 
1516
-// Support for an RGB LED using 3 separate pins with optional PWM
1516
+/**
1517
+ * RGB LED / LED Strip Control
1518
+ *
1519
+ * Enable support for an RGB LED connected to 5V digital pins, or
1520
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1521
+ *
1522
+ * Adds the M150 command to set the LED (or LED strip) color. 
1523
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1524
+ * luminance values can be set from 0 to 255.
1525
+ *
1526
+ * *** CAUTION ***
1527
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1528
+ *  as the Arduino cannot handle the current the LEDs will require.
1529
+ *  Failure to follow this precaution can destroy your Arduino!
1530
+ * *** CAUTION ***
1531
+ *
1532
+ */
1517 1533
 //#define RGB_LED
1518
-#if ENABLED(RGB_LED)
1534
+//#define RGBW_LED
1535
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1519 1536
   #define RGB_LED_R_PIN 34
1520 1537
   #define RGB_LED_G_PIN 43
1521 1538
   #define RGB_LED_B_PIN 35
1539
+  #define RGB_LED_W_PIN -1
1540
+#endif
1541
+
1542
+/**
1543
+ * Printer Event LEDs
1544
+ *
1545
+ * During printing, the LEDs will reflect the printer status:
1546
+ *
1547
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1548
+ *  - Gradually change from violet to red as the hotend gets to temperature
1549
+ *  - Change to white to illuminate work surface
1550
+ *  - Change to green once print has finished
1551
+ *  - Turn off after the print has finished and the user has pushed a button
1552
+ */
1553
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1554
+  #define PRINTER_EVENT_LEDS
1522 1555
 #endif
1523 1556
 
1524 1557
 /*********************************************************************\

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

@@ -1497,12 +1497,45 @@
1497 1497
 //define BlinkM/CyzRgb Support
1498 1498
 //#define BLINKM
1499 1499
 
1500
-// Support for an RGB LED using 3 separate pins with optional PWM
1500
+/**
1501
+ * RGB LED / LED Strip Control
1502
+ *
1503
+ * Enable support for an RGB LED connected to 5V digital pins, or
1504
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1505
+ *
1506
+ * Adds the M150 command to set the LED (or LED strip) color. 
1507
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1508
+ * luminance values can be set from 0 to 255.
1509
+ *
1510
+ * *** CAUTION ***
1511
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1512
+ *  as the Arduino cannot handle the current the LEDs will require.
1513
+ *  Failure to follow this precaution can destroy your Arduino!
1514
+ * *** CAUTION ***
1515
+ *
1516
+ */
1501 1517
 //#define RGB_LED
1502
-#if ENABLED(RGB_LED)
1518
+//#define RGBW_LED
1519
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1503 1520
   #define RGB_LED_R_PIN 34
1504 1521
   #define RGB_LED_G_PIN 43
1505 1522
   #define RGB_LED_B_PIN 35
1523
+  #define RGB_LED_W_PIN -1
1524
+#endif
1525
+
1526
+/**
1527
+ * Printer Event LEDs
1528
+ *
1529
+ * During printing, the LEDs will reflect the printer status:
1530
+ *
1531
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1532
+ *  - Gradually change from violet to red as the hotend gets to temperature
1533
+ *  - Change to white to illuminate work surface
1534
+ *  - Change to green once print has finished
1535
+ *  - Turn off after the print has finished and the user has pushed a button
1536
+ */
1537
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1538
+  #define PRINTER_EVENT_LEDS
1506 1539
 #endif
1507 1540
 
1508 1541
 /*********************************************************************\

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

@@ -1497,12 +1497,45 @@
1497 1497
 //define BlinkM/CyzRgb Support
1498 1498
 //#define BLINKM
1499 1499
 
1500
-// Support for an RGB LED using 3 separate pins with optional PWM
1500
+/**
1501
+ * RGB LED / LED Strip Control
1502
+ *
1503
+ * Enable support for an RGB LED connected to 5V digital pins, or
1504
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1505
+ *
1506
+ * Adds the M150 command to set the LED (or LED strip) color. 
1507
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1508
+ * luminance values can be set from 0 to 255.
1509
+ *
1510
+ * *** CAUTION ***
1511
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1512
+ *  as the Arduino cannot handle the current the LEDs will require.
1513
+ *  Failure to follow this precaution can destroy your Arduino!
1514
+ * *** CAUTION ***
1515
+ *
1516
+ */
1501 1517
 //#define RGB_LED
1502
-#if ENABLED(RGB_LED)
1518
+//#define RGBW_LED
1519
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1503 1520
   #define RGB_LED_R_PIN 34
1504 1521
   #define RGB_LED_G_PIN 43
1505 1522
   #define RGB_LED_B_PIN 35
1523
+  #define RGB_LED_W_PIN -1
1524
+#endif
1525
+
1526
+/**
1527
+ * Printer Event LEDs
1528
+ *
1529
+ * During printing, the LEDs will reflect the printer status:
1530
+ *
1531
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1532
+ *  - Gradually change from violet to red as the hotend gets to temperature
1533
+ *  - Change to white to illuminate work surface
1534
+ *  - Change to green once print has finished
1535
+ *  - Turn off after the print has finished and the user has pushed a button
1536
+ */
1537
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1538
+  #define PRINTER_EVENT_LEDS
1506 1539
 #endif
1507 1540
 
1508 1541
 /*********************************************************************\

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

@@ -1505,12 +1505,45 @@
1505 1505
 //define BlinkM/CyzRgb Support
1506 1506
 //#define BLINKM
1507 1507
 
1508
-// Support for an RGB LED using 3 separate pins with optional PWM
1508
+/**
1509
+ * RGB LED / LED Strip Control
1510
+ *
1511
+ * Enable support for an RGB LED connected to 5V digital pins, or
1512
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1513
+ *
1514
+ * Adds the M150 command to set the LED (or LED strip) color. 
1515
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1516
+ * luminance values can be set from 0 to 255.
1517
+ *
1518
+ * *** CAUTION ***
1519
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1520
+ *  as the Arduino cannot handle the current the LEDs will require.
1521
+ *  Failure to follow this precaution can destroy your Arduino!
1522
+ * *** CAUTION ***
1523
+ *
1524
+ */
1509 1525
 //#define RGB_LED
1510
-#if ENABLED(RGB_LED)
1526
+//#define RGBW_LED
1527
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1511 1528
   #define RGB_LED_R_PIN 34
1512 1529
   #define RGB_LED_G_PIN 43
1513 1530
   #define RGB_LED_B_PIN 35
1531
+  #define RGB_LED_W_PIN -1
1532
+#endif
1533
+
1534
+/**
1535
+ * Printer Event LEDs
1536
+ *
1537
+ * During printing, the LEDs will reflect the printer status:
1538
+ *
1539
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1540
+ *  - Gradually change from violet to red as the hotend gets to temperature
1541
+ *  - Change to white to illuminate work surface
1542
+ *  - Change to green once print has finished
1543
+ *  - Turn off after the print has finished and the user has pushed a button
1544
+ */
1545
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1546
+  #define PRINTER_EVENT_LEDS
1514 1547
 #endif
1515 1548
 
1516 1549
 /*********************************************************************\

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

@@ -1508,12 +1508,45 @@
1508 1508
 //define BlinkM/CyzRgb Support
1509 1509
 //#define BLINKM
1510 1510
 
1511
-// Support for an RGB LED using 3 separate pins with optional PWM
1511
+/**
1512
+ * RGB LED / LED Strip Control
1513
+ *
1514
+ * Enable support for an RGB LED connected to 5V digital pins, or
1515
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1516
+ *
1517
+ * Adds the M150 command to set the LED (or LED strip) color. 
1518
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1519
+ * luminance values can be set from 0 to 255.
1520
+ *
1521
+ * *** CAUTION ***
1522
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1523
+ *  as the Arduino cannot handle the current the LEDs will require.
1524
+ *  Failure to follow this precaution can destroy your Arduino!
1525
+ * *** CAUTION ***
1526
+ *
1527
+ */
1512 1528
 //#define RGB_LED
1513
-#if ENABLED(RGB_LED)
1529
+//#define RGBW_LED
1530
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1514 1531
   #define RGB_LED_R_PIN 34
1515 1532
   #define RGB_LED_G_PIN 43
1516 1533
   #define RGB_LED_B_PIN 35
1534
+  #define RGB_LED_W_PIN -1
1535
+#endif
1536
+
1537
+/**
1538
+ * Printer Event LEDs
1539
+ *
1540
+ * During printing, the LEDs will reflect the printer status:
1541
+ *
1542
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1543
+ *  - Gradually change from violet to red as the hotend gets to temperature
1544
+ *  - Change to white to illuminate work surface
1545
+ *  - Change to green once print has finished
1546
+ *  - Turn off after the print has finished and the user has pushed a button
1547
+ */
1548
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1549
+  #define PRINTER_EVENT_LEDS
1517 1550
 #endif
1518 1551
 
1519 1552
 /*********************************************************************\

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

@@ -1548,12 +1548,45 @@
1548 1548
 //define BlinkM/CyzRgb Support
1549 1549
 //#define BLINKM
1550 1550
 
1551
-// Support for an RGB LED using 3 separate pins with optional PWM
1551
+/**
1552
+ * RGB LED / LED Strip Control
1553
+ *
1554
+ * Enable support for an RGB LED connected to 5V digital pins, or
1555
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1556
+ *
1557
+ * Adds the M150 command to set the LED (or LED strip) color. 
1558
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1559
+ * luminance values can be set from 0 to 255.
1560
+ *
1561
+ * *** CAUTION ***
1562
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1563
+ *  as the Arduino cannot handle the current the LEDs will require.
1564
+ *  Failure to follow this precaution can destroy your Arduino!
1565
+ * *** CAUTION ***
1566
+ *
1567
+ */
1552 1568
 //#define RGB_LED
1553
-#if ENABLED(RGB_LED)
1569
+//#define RGBW_LED
1570
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1554 1571
   #define RGB_LED_R_PIN 34
1555 1572
   #define RGB_LED_G_PIN 43
1556 1573
   #define RGB_LED_B_PIN 35
1574
+  #define RGB_LED_W_PIN -1
1575
+#endif
1576
+
1577
+/**
1578
+ * Printer Event LEDs
1579
+ *
1580
+ * During printing, the LEDs will reflect the printer status:
1581
+ *
1582
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1583
+ *  - Gradually change from violet to red as the hotend gets to temperature
1584
+ *  - Change to white to illuminate work surface
1585
+ *  - Change to green once print has finished
1586
+ *  - Turn off after the print has finished and the user has pushed a button
1587
+ */
1588
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1589
+  #define PRINTER_EVENT_LEDS
1557 1590
 #endif
1558 1591
 
1559 1592
 /*********************************************************************\

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

@@ -1514,12 +1514,45 @@
1514 1514
 //define BlinkM/CyzRgb Support
1515 1515
 //#define BLINKM
1516 1516
 
1517
-// Support for an RGB LED using 3 separate pins with optional PWM
1517
+/**
1518
+ * RGB LED / LED Strip Control
1519
+ *
1520
+ * Enable support for an RGB LED connected to 5V digital pins, or
1521
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1522
+ *
1523
+ * Adds the M150 command to set the LED (or LED strip) color. 
1524
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1525
+ * luminance values can be set from 0 to 255.
1526
+ *
1527
+ * *** CAUTION ***
1528
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1529
+ *  as the Arduino cannot handle the current the LEDs will require.
1530
+ *  Failure to follow this precaution can destroy your Arduino!
1531
+ * *** CAUTION ***
1532
+ *
1533
+ */
1518 1534
 //#define RGB_LED
1519
-#if ENABLED(RGB_LED)
1535
+//#define RGBW_LED
1536
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1520 1537
   #define RGB_LED_R_PIN 34
1521 1538
   #define RGB_LED_G_PIN 43
1522 1539
   #define RGB_LED_B_PIN 35
1540
+  #define RGB_LED_W_PIN -1
1541
+#endif
1542
+
1543
+/**
1544
+ * Printer Event LEDs
1545
+ *
1546
+ * During printing, the LEDs will reflect the printer status:
1547
+ *
1548
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1549
+ *  - Gradually change from violet to red as the hotend gets to temperature
1550
+ *  - Change to white to illuminate work surface
1551
+ *  - Change to green once print has finished
1552
+ *  - Turn off after the print has finished and the user has pushed a button
1553
+ */
1554
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1555
+  #define PRINTER_EVENT_LEDS
1523 1556
 #endif
1524 1557
 
1525 1558
 /*********************************************************************\

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

@@ -1514,12 +1514,45 @@
1514 1514
 //define BlinkM/CyzRgb Support
1515 1515
 //#define BLINKM
1516 1516
 
1517
-// Support for an RGB LED using 3 separate pins with optional PWM
1517
+/**
1518
+ * RGB LED / LED Strip Control
1519
+ *
1520
+ * Enable support for an RGB LED connected to 5V digital pins, or
1521
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1522
+ *
1523
+ * Adds the M150 command to set the LED (or LED strip) color. 
1524
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1525
+ * luminance values can be set from 0 to 255.
1526
+ *
1527
+ * *** CAUTION ***
1528
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1529
+ *  as the Arduino cannot handle the current the LEDs will require.
1530
+ *  Failure to follow this precaution can destroy your Arduino!
1531
+ * *** CAUTION ***
1532
+ *
1533
+ */
1518 1534
 //#define RGB_LED
1519
-#if ENABLED(RGB_LED)
1535
+//#define RGBW_LED
1536
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1520 1537
   #define RGB_LED_R_PIN 34
1521 1538
   #define RGB_LED_G_PIN 43
1522 1539
   #define RGB_LED_B_PIN 35
1540
+  #define RGB_LED_W_PIN -1
1541
+#endif
1542
+
1543
+/**
1544
+ * Printer Event LEDs
1545
+ *
1546
+ * During printing, the LEDs will reflect the printer status:
1547
+ *
1548
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1549
+ *  - Gradually change from violet to red as the hotend gets to temperature
1550
+ *  - Change to white to illuminate work surface
1551
+ *  - Change to green once print has finished
1552
+ *  - Turn off after the print has finished and the user has pushed a button
1553
+ */
1554
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1555
+  #define PRINTER_EVENT_LEDS
1523 1556
 #endif
1524 1557
 
1525 1558
 /*********************************************************************\

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

@@ -1514,12 +1514,45 @@
1514 1514
 //define BlinkM/CyzRgb Support
1515 1515
 //#define BLINKM
1516 1516
 
1517
-// Support for an RGB LED using 3 separate pins with optional PWM
1517
+/**
1518
+ * RGB LED / LED Strip Control
1519
+ *
1520
+ * Enable support for an RGB LED connected to 5V digital pins, or
1521
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1522
+ *
1523
+ * Adds the M150 command to set the LED (or LED strip) color. 
1524
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1525
+ * luminance values can be set from 0 to 255.
1526
+ *
1527
+ * *** CAUTION ***
1528
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1529
+ *  as the Arduino cannot handle the current the LEDs will require.
1530
+ *  Failure to follow this precaution can destroy your Arduino!
1531
+ * *** CAUTION ***
1532
+ *
1533
+ */
1518 1534
 //#define RGB_LED
1519
-#if ENABLED(RGB_LED)
1535
+//#define RGBW_LED
1536
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1520 1537
   #define RGB_LED_R_PIN 34
1521 1538
   #define RGB_LED_G_PIN 43
1522 1539
   #define RGB_LED_B_PIN 35
1540
+  #define RGB_LED_W_PIN -1
1541
+#endif
1542
+
1543
+/**
1544
+ * Printer Event LEDs
1545
+ *
1546
+ * During printing, the LEDs will reflect the printer status:
1547
+ *
1548
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1549
+ *  - Gradually change from violet to red as the hotend gets to temperature
1550
+ *  - Change to white to illuminate work surface
1551
+ *  - Change to green once print has finished
1552
+ *  - Turn off after the print has finished and the user has pushed a button
1553
+ */
1554
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1555
+  #define PRINTER_EVENT_LEDS
1523 1556
 #endif
1524 1557
 
1525 1558
 /*********************************************************************\

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

@@ -1515,12 +1515,45 @@
1515 1515
 //define BlinkM/CyzRgb Support
1516 1516
 //#define BLINKM
1517 1517
 
1518
-// Support for an RGB LED using 3 separate pins with optional PWM
1518
+/**
1519
+ * RGB LED / LED Strip Control
1520
+ *
1521
+ * Enable support for an RGB LED connected to 5V digital pins, or
1522
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1523
+ *
1524
+ * Adds the M150 command to set the LED (or LED strip) color. 
1525
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1526
+ * luminance values can be set from 0 to 255.
1527
+ *
1528
+ * *** CAUTION ***
1529
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1530
+ *  as the Arduino cannot handle the current the LEDs will require.
1531
+ *  Failure to follow this precaution can destroy your Arduino!
1532
+ * *** CAUTION ***
1533
+ *
1534
+ */
1519 1535
 //#define RGB_LED
1520
-#if ENABLED(RGB_LED)
1536
+//#define RGBW_LED
1537
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1521 1538
   #define RGB_LED_R_PIN 34
1522 1539
   #define RGB_LED_G_PIN 43
1523 1540
   #define RGB_LED_B_PIN 35
1541
+  #define RGB_LED_W_PIN -1
1542
+#endif
1543
+
1544
+/**
1545
+ * Printer Event LEDs
1546
+ *
1547
+ * During printing, the LEDs will reflect the printer status:
1548
+ *
1549
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1550
+ *  - Gradually change from violet to red as the hotend gets to temperature
1551
+ *  - Change to white to illuminate work surface
1552
+ *  - Change to green once print has finished
1553
+ *  - Turn off after the print has finished and the user has pushed a button
1554
+ */
1555
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1556
+  #define PRINTER_EVENT_LEDS
1524 1557
 #endif
1525 1558
 
1526 1559
 /*********************************************************************\

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

@@ -1529,12 +1529,45 @@
1529 1529
 //define BlinkM/CyzRgb Support
1530 1530
 //#define BLINKM
1531 1531
 
1532
-// Support for an RGB LED using 3 separate pins with optional PWM
1532
+/**
1533
+ * RGB LED / LED Strip Control
1534
+ *
1535
+ * Enable support for an RGB LED connected to 5V digital pins, or
1536
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1537
+ *
1538
+ * Adds the M150 command to set the LED (or LED strip) color. 
1539
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1540
+ * luminance values can be set from 0 to 255.
1541
+ *
1542
+ * *** CAUTION ***
1543
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1544
+ *  as the Arduino cannot handle the current the LEDs will require.
1545
+ *  Failure to follow this precaution can destroy your Arduino!
1546
+ * *** CAUTION ***
1547
+ *
1548
+ */
1533 1549
 //#define RGB_LED
1534
-#if ENABLED(RGB_LED)
1550
+//#define RGBW_LED
1551
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1535 1552
   #define RGB_LED_R_PIN 34
1536 1553
   #define RGB_LED_G_PIN 43
1537 1554
   #define RGB_LED_B_PIN 35
1555
+  #define RGB_LED_W_PIN -1
1556
+#endif
1557
+
1558
+/**
1559
+ * Printer Event LEDs
1560
+ *
1561
+ * During printing, the LEDs will reflect the printer status:
1562
+ *
1563
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1564
+ *  - Gradually change from violet to red as the hotend gets to temperature
1565
+ *  - Change to white to illuminate work surface
1566
+ *  - Change to green once print has finished
1567
+ *  - Turn off after the print has finished and the user has pushed a button
1568
+ */
1569
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1570
+  #define PRINTER_EVENT_LEDS
1538 1571
 #endif
1539 1572
 
1540 1573
 /*********************************************************************\

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

@@ -1534,12 +1534,45 @@
1534 1534
 //define BlinkM/CyzRgb Support
1535 1535
 //#define BLINKM
1536 1536
 
1537
-// Support for an RGB LED using 3 separate pins with optional PWM
1537
+/**
1538
+ * RGB LED / LED Strip Control
1539
+ *
1540
+ * Enable support for an RGB LED connected to 5V digital pins, or
1541
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1542
+ *
1543
+ * Adds the M150 command to set the LED (or LED strip) color. 
1544
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1545
+ * luminance values can be set from 0 to 255.
1546
+ *
1547
+ * *** CAUTION ***
1548
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1549
+ *  as the Arduino cannot handle the current the LEDs will require.
1550
+ *  Failure to follow this precaution can destroy your Arduino!
1551
+ * *** CAUTION ***
1552
+ *
1553
+ */
1538 1554
 //#define RGB_LED
1539
-#if ENABLED(RGB_LED)
1555
+//#define RGBW_LED
1556
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1540 1557
   #define RGB_LED_R_PIN 34
1541 1558
   #define RGB_LED_G_PIN 43
1542 1559
   #define RGB_LED_B_PIN 35
1560
+  #define RGB_LED_W_PIN -1
1561
+#endif
1562
+
1563
+/**
1564
+ * Printer Event LEDs
1565
+ *
1566
+ * During printing, the LEDs will reflect the printer status:
1567
+ *
1568
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1569
+ *  - Gradually change from violet to red as the hotend gets to temperature
1570
+ *  - Change to white to illuminate work surface
1571
+ *  - Change to green once print has finished
1572
+ *  - Turn off after the print has finished and the user has pushed a button
1573
+ */
1574
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1575
+  #define PRINTER_EVENT_LEDS
1543 1576
 #endif
1544 1577
 
1545 1578
 /*********************************************************************\

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

@@ -1570,12 +1570,45 @@
1570 1570
 //define BlinkM/CyzRgb Support
1571 1571
 //#define BLINKM
1572 1572
 
1573
-// Support for an RGB LED using 3 separate pins with optional PWM
1573
+/**
1574
+ * RGB LED / LED Strip Control
1575
+ *
1576
+ * Enable support for an RGB LED connected to 5V digital pins, or
1577
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1578
+ *
1579
+ * Adds the M150 command to set the LED (or LED strip) color. 
1580
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1581
+ * luminance values can be set from 0 to 255.
1582
+ *
1583
+ * *** CAUTION ***
1584
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1585
+ *  as the Arduino cannot handle the current the LEDs will require.
1586
+ *  Failure to follow this precaution can destroy your Arduino!
1587
+ * *** CAUTION ***
1588
+ *
1589
+ */
1574 1590
 //#define RGB_LED
1575
-#if ENABLED(RGB_LED)
1591
+//#define RGBW_LED
1592
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1576 1593
   #define RGB_LED_R_PIN 34
1577 1594
   #define RGB_LED_G_PIN 43
1578 1595
   #define RGB_LED_B_PIN 35
1596
+  #define RGB_LED_W_PIN -1
1597
+#endif
1598
+
1599
+/**
1600
+ * Printer Event LEDs
1601
+ *
1602
+ * During printing, the LEDs will reflect the printer status:
1603
+ *
1604
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1605
+ *  - Gradually change from violet to red as the hotend gets to temperature
1606
+ *  - Change to white to illuminate work surface
1607
+ *  - Change to green once print has finished
1608
+ *  - Turn off after the print has finished and the user has pushed a button
1609
+ */
1610
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1611
+  #define PRINTER_EVENT_LEDS
1579 1612
 #endif
1580 1613
 
1581 1614
 /*********************************************************************\

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

@@ -1505,12 +1505,45 @@
1505 1505
 //define BlinkM/CyzRgb Support
1506 1506
 //#define BLINKM
1507 1507
 
1508
-// Support for an RGB LED using 3 separate pins with optional PWM
1508
+/**
1509
+ * RGB LED / LED Strip Control
1510
+ *
1511
+ * Enable support for an RGB LED connected to 5V digital pins, or
1512
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1513
+ *
1514
+ * Adds the M150 command to set the LED (or LED strip) color. 
1515
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1516
+ * luminance values can be set from 0 to 255.
1517
+ *
1518
+ * *** CAUTION ***
1519
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1520
+ *  as the Arduino cannot handle the current the LEDs will require.
1521
+ *  Failure to follow this precaution can destroy your Arduino!
1522
+ * *** CAUTION ***
1523
+ *
1524
+ */
1509 1525
 //#define RGB_LED
1510
-#if ENABLED(RGB_LED)
1526
+//#define RGBW_LED
1527
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1511 1528
   #define RGB_LED_R_PIN 34
1512 1529
   #define RGB_LED_G_PIN 43
1513 1530
   #define RGB_LED_B_PIN 35
1531
+  #define RGB_LED_W_PIN -1
1532
+#endif
1533
+
1534
+/**
1535
+ * Printer Event LEDs
1536
+ *
1537
+ * During printing, the LEDs will reflect the printer status:
1538
+ *
1539
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1540
+ *  - Gradually change from violet to red as the hotend gets to temperature
1541
+ *  - Change to white to illuminate work surface
1542
+ *  - Change to green once print has finished
1543
+ *  - Turn off after the print has finished and the user has pushed a button
1544
+ */
1545
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1546
+  #define PRINTER_EVENT_LEDS
1514 1547
 #endif
1515 1548
 
1516 1549
 /*********************************************************************\

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

@@ -1514,12 +1514,45 @@
1514 1514
 //define BlinkM/CyzRgb Support
1515 1515
 //#define BLINKM
1516 1516
 
1517
-// Support for an RGB LED using 3 separate pins with optional PWM
1517
+/**
1518
+ * RGB LED / LED Strip Control
1519
+ *
1520
+ * Enable support for an RGB LED connected to 5V digital pins, or
1521
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1522
+ *
1523
+ * Adds the M150 command to set the LED (or LED strip) color. 
1524
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1525
+ * luminance values can be set from 0 to 255.
1526
+ *
1527
+ * *** CAUTION ***
1528
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1529
+ *  as the Arduino cannot handle the current the LEDs will require.
1530
+ *  Failure to follow this precaution can destroy your Arduino!
1531
+ * *** CAUTION ***
1532
+ *
1533
+ */
1518 1534
 //#define RGB_LED
1519
-#if ENABLED(RGB_LED)
1535
+//#define RGBW_LED
1536
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1520 1537
   #define RGB_LED_R_PIN 34
1521 1538
   #define RGB_LED_G_PIN 43
1522 1539
   #define RGB_LED_B_PIN 35
1540
+  #define RGB_LED_W_PIN -1
1541
+#endif
1542
+
1543
+/**
1544
+ * Printer Event LEDs
1545
+ *
1546
+ * During printing, the LEDs will reflect the printer status:
1547
+ *
1548
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1549
+ *  - Gradually change from violet to red as the hotend gets to temperature
1550
+ *  - Change to white to illuminate work surface
1551
+ *  - Change to green once print has finished
1552
+ *  - Turn off after the print has finished and the user has pushed a button
1553
+ */
1554
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1555
+  #define PRINTER_EVENT_LEDS
1523 1556
 #endif
1524 1557
 
1525 1558
 /*********************************************************************\

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

@@ -1630,12 +1630,45 @@
1630 1630
 //define BlinkM/CyzRgb Support
1631 1631
 //#define BLINKM
1632 1632
 
1633
-// Support for an RGB LED using 3 separate pins with optional PWM
1633
+/**
1634
+ * RGB LED / LED Strip Control
1635
+ *
1636
+ * Enable support for an RGB LED connected to 5V digital pins, or
1637
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1638
+ *
1639
+ * Adds the M150 command to set the LED (or LED strip) color. 
1640
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1641
+ * luminance values can be set from 0 to 255.
1642
+ *
1643
+ * *** CAUTION ***
1644
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1645
+ *  as the Arduino cannot handle the current the LEDs will require.
1646
+ *  Failure to follow this precaution can destroy your Arduino!
1647
+ * *** CAUTION ***
1648
+ *
1649
+ */
1634 1650
 //#define RGB_LED
1635
-#if ENABLED(RGB_LED)
1651
+//#define RGBW_LED
1652
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1636 1653
   #define RGB_LED_R_PIN 34
1637 1654
   #define RGB_LED_G_PIN 43
1638 1655
   #define RGB_LED_B_PIN 35
1656
+  #define RGB_LED_W_PIN -1
1657
+#endif
1658
+
1659
+/**
1660
+ * Printer Event LEDs
1661
+ *
1662
+ * During printing, the LEDs will reflect the printer status:
1663
+ *
1664
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1665
+ *  - Gradually change from violet to red as the hotend gets to temperature
1666
+ *  - Change to white to illuminate work surface
1667
+ *  - Change to green once print has finished
1668
+ *  - Turn off after the print has finished and the user has pushed a button
1669
+ */
1670
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1671
+  #define PRINTER_EVENT_LEDS
1639 1672
 #endif
1640 1673
 
1641 1674
 /*********************************************************************\

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

@@ -1616,12 +1616,45 @@
1616 1616
 //define BlinkM/CyzRgb Support
1617 1617
 //#define BLINKM
1618 1618
 
1619
-// Support for an RGB LED using 3 separate pins with optional PWM
1619
+/**
1620
+ * RGB LED / LED Strip Control
1621
+ *
1622
+ * Enable support for an RGB LED connected to 5V digital pins, or
1623
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1624
+ *
1625
+ * Adds the M150 command to set the LED (or LED strip) color. 
1626
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1627
+ * luminance values can be set from 0 to 255.
1628
+ *
1629
+ * *** CAUTION ***
1630
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1631
+ *  as the Arduino cannot handle the current the LEDs will require.
1632
+ *  Failure to follow this precaution can destroy your Arduino!
1633
+ * *** CAUTION ***
1634
+ *
1635
+ */
1620 1636
 //#define RGB_LED
1621
-#if ENABLED(RGB_LED)
1637
+//#define RGBW_LED
1638
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1622 1639
   #define RGB_LED_R_PIN 34
1623 1640
   #define RGB_LED_G_PIN 43
1624 1641
   #define RGB_LED_B_PIN 35
1642
+  #define RGB_LED_W_PIN -1
1643
+#endif
1644
+
1645
+/**
1646
+ * Printer Event LEDs
1647
+ *
1648
+ * During printing, the LEDs will reflect the printer status:
1649
+ *
1650
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1651
+ *  - Gradually change from violet to red as the hotend gets to temperature
1652
+ *  - Change to white to illuminate work surface
1653
+ *  - Change to green once print has finished
1654
+ *  - Turn off after the print has finished and the user has pushed a button
1655
+ */
1656
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1657
+  #define PRINTER_EVENT_LEDS
1625 1658
 #endif
1626 1659
 
1627 1660
 /*********************************************************************\

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

@@ -1612,12 +1612,45 @@
1612 1612
 //define BlinkM/CyzRgb Support
1613 1613
 //#define BLINKM
1614 1614
 
1615
-// Support for an RGB LED using 3 separate pins with optional PWM
1615
+/**
1616
+ * RGB LED / LED Strip Control
1617
+ *
1618
+ * Enable support for an RGB LED connected to 5V digital pins, or
1619
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1620
+ *
1621
+ * Adds the M150 command to set the LED (or LED strip) color. 
1622
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1623
+ * luminance values can be set from 0 to 255.
1624
+ *
1625
+ * *** CAUTION ***
1626
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1627
+ *  as the Arduino cannot handle the current the LEDs will require.
1628
+ *  Failure to follow this precaution can destroy your Arduino!
1629
+ * *** CAUTION ***
1630
+ *
1631
+ */
1616 1632
 //#define RGB_LED
1617
-#if ENABLED(RGB_LED)
1633
+//#define RGBW_LED
1634
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1618 1635
   #define RGB_LED_R_PIN 34
1619 1636
   #define RGB_LED_G_PIN 43
1620 1637
   #define RGB_LED_B_PIN 35
1638
+  #define RGB_LED_W_PIN -1
1639
+#endif
1640
+
1641
+/**
1642
+ * Printer Event LEDs
1643
+ *
1644
+ * During printing, the LEDs will reflect the printer status:
1645
+ *
1646
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1647
+ *  - Gradually change from violet to red as the hotend gets to temperature
1648
+ *  - Change to white to illuminate work surface
1649
+ *  - Change to green once print has finished
1650
+ *  - Turn off after the print has finished and the user has pushed a button
1651
+ */
1652
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1653
+  #define PRINTER_EVENT_LEDS
1621 1654
 #endif
1622 1655
 
1623 1656
 /*********************************************************************\

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

@@ -1620,12 +1620,45 @@
1620 1620
 //define BlinkM/CyzRgb Support
1621 1621
 //#define BLINKM
1622 1622
 
1623
-// Support for an RGB LED using 3 separate pins with optional PWM
1623
+/**
1624
+ * RGB LED / LED Strip Control
1625
+ *
1626
+ * Enable support for an RGB LED connected to 5V digital pins, or
1627
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1628
+ *
1629
+ * Adds the M150 command to set the LED (or LED strip) color. 
1630
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1631
+ * luminance values can be set from 0 to 255.
1632
+ *
1633
+ * *** CAUTION ***
1634
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1635
+ *  as the Arduino cannot handle the current the LEDs will require.
1636
+ *  Failure to follow this precaution can destroy your Arduino!
1637
+ * *** CAUTION ***
1638
+ *
1639
+ */
1624 1640
 //#define RGB_LED
1625
-#if ENABLED(RGB_LED)
1641
+//#define RGBW_LED
1642
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1626 1643
   #define RGB_LED_R_PIN 34
1627 1644
   #define RGB_LED_G_PIN 43
1628 1645
   #define RGB_LED_B_PIN 35
1646
+  #define RGB_LED_W_PIN -1
1647
+#endif
1648
+
1649
+/**
1650
+ * Printer Event LEDs
1651
+ *
1652
+ * During printing, the LEDs will reflect the printer status:
1653
+ *
1654
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1655
+ *  - Gradually change from violet to red as the hotend gets to temperature
1656
+ *  - Change to white to illuminate work surface
1657
+ *  - Change to green once print has finished
1658
+ *  - Turn off after the print has finished and the user has pushed a button
1659
+ */
1660
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1661
+  #define PRINTER_EVENT_LEDS
1629 1662
 #endif
1630 1663
 
1631 1664
 /*********************************************************************\

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

@@ -1627,12 +1627,45 @@
1627 1627
 //define BlinkM/CyzRgb Support
1628 1628
 //#define BLINKM
1629 1629
 
1630
-// Support for an RGB LED using 3 separate pins with optional PWM
1630
+/**
1631
+ * RGB LED / LED Strip Control
1632
+ *
1633
+ * Enable support for an RGB LED connected to 5V digital pins, or
1634
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1635
+ *
1636
+ * Adds the M150 command to set the LED (or LED strip) color. 
1637
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1638
+ * luminance values can be set from 0 to 255.
1639
+ *
1640
+ * *** CAUTION ***
1641
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1642
+ *  as the Arduino cannot handle the current the LEDs will require.
1643
+ *  Failure to follow this precaution can destroy your Arduino!
1644
+ * *** CAUTION ***
1645
+ *
1646
+ */
1631 1647
 //#define RGB_LED
1632
-#if ENABLED(RGB_LED)
1648
+//#define RGBW_LED
1649
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1633 1650
   #define RGB_LED_R_PIN 34
1634 1651
   #define RGB_LED_G_PIN 43
1635 1652
   #define RGB_LED_B_PIN 35
1653
+  #define RGB_LED_W_PIN -1
1654
+#endif
1655
+
1656
+/**
1657
+ * Printer Event LEDs
1658
+ *
1659
+ * During printing, the LEDs will reflect the printer status:
1660
+ *
1661
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1662
+ *  - Gradually change from violet to red as the hotend gets to temperature
1663
+ *  - Change to white to illuminate work surface
1664
+ *  - Change to green once print has finished
1665
+ *  - Turn off after the print has finished and the user has pushed a button
1666
+ */
1667
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1668
+  #define PRINTER_EVENT_LEDS
1636 1669
 #endif
1637 1670
 
1638 1671
 /*********************************************************************\

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

@@ -1517,12 +1517,45 @@
1517 1517
 //define BlinkM/CyzRgb Support
1518 1518
 //#define BLINKM
1519 1519
 
1520
-// Support for an RGB LED using 3 separate pins with optional PWM
1520
+/**
1521
+ * RGB LED / LED Strip Control
1522
+ *
1523
+ * Enable support for an RGB LED connected to 5V digital pins, or
1524
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1525
+ *
1526
+ * Adds the M150 command to set the LED (or LED strip) color. 
1527
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1528
+ * luminance values can be set from 0 to 255.
1529
+ *
1530
+ * *** CAUTION ***
1531
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1532
+ *  as the Arduino cannot handle the current the LEDs will require.
1533
+ *  Failure to follow this precaution can destroy your Arduino!
1534
+ * *** CAUTION ***
1535
+ *
1536
+ */
1521 1537
 //#define RGB_LED
1522
-#if ENABLED(RGB_LED)
1538
+//#define RGBW_LED
1539
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1523 1540
   #define RGB_LED_R_PIN 34
1524 1541
   #define RGB_LED_G_PIN 43
1525 1542
   #define RGB_LED_B_PIN 35
1543
+  #define RGB_LED_W_PIN -1
1544
+#endif
1545
+
1546
+/**
1547
+ * Printer Event LEDs
1548
+ *
1549
+ * During printing, the LEDs will reflect the printer status:
1550
+ *
1551
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1552
+ *  - Gradually change from violet to red as the hotend gets to temperature
1553
+ *  - Change to white to illuminate work surface
1554
+ *  - Change to green once print has finished
1555
+ *  - Turn off after the print has finished and the user has pushed a button
1556
+ */
1557
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1558
+  #define PRINTER_EVENT_LEDS
1526 1559
 #endif
1527 1560
 
1528 1561
 /*********************************************************************\

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

@@ -1510,12 +1510,45 @@
1510 1510
 //define BlinkM/CyzRgb Support
1511 1511
 //#define BLINKM
1512 1512
 
1513
-// Support for an RGB LED using 3 separate pins with optional PWM
1513
+/**
1514
+ * RGB LED / LED Strip Control
1515
+ *
1516
+ * Enable support for an RGB LED connected to 5V digital pins, or
1517
+ * an RGB Strip connected to MOSFETs controlled by digital pins.
1518
+ *
1519
+ * Adds the M150 command to set the LED (or LED strip) color. 
1520
+ * If pins are PWM capable (e.g., 4, 5, 6, 11) then a range of
1521
+ * luminance values can be set from 0 to 255.
1522
+ *
1523
+ * *** CAUTION ***
1524
+ *  LED Strips require a MOFSET Chip between PWM lines and LEDs,
1525
+ *  as the Arduino cannot handle the current the LEDs will require.
1526
+ *  Failure to follow this precaution can destroy your Arduino!
1527
+ * *** CAUTION ***
1528
+ *
1529
+ */
1514 1530
 //#define RGB_LED
1515
-#if ENABLED(RGB_LED)
1531
+//#define RGBW_LED
1532
+#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1516 1533
   #define RGB_LED_R_PIN 34
1517 1534
   #define RGB_LED_G_PIN 43
1518 1535
   #define RGB_LED_B_PIN 35
1536
+  #define RGB_LED_W_PIN -1
1537
+#endif
1538
+
1539
+/**
1540
+ * Printer Event LEDs
1541
+ *
1542
+ * During printing, the LEDs will reflect the printer status:
1543
+ *
1544
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1545
+ *  - Gradually change from violet to red as the hotend gets to temperature
1546
+ *  - Change to white to illuminate work surface
1547
+ *  - Change to green once print has finished
1548
+ *  - Turn off after the print has finished and the user has pushed a button
1549
+ */
1550
+#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
1551
+  #define PRINTER_EVENT_LEDS
1519 1552
 #endif
1520 1553
 
1521 1554
 /*********************************************************************\

+ 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