Bläddra i källkod

Extend RGB LED support, adding Printer Events

Scott Lahteine 8 år sedan
förälder
incheckning
e7746ffee4
26 ändrade filer med 812 tillägg och 47 borttagningar
  1. 1
    0
      Marlin/Conditionals_LCD.h
  2. 32
    1
      Marlin/Configuration.h
  3. 73
    24
      Marlin/Marlin_main.cpp
  4. 2
    0
      Marlin/SanityCheck.h
  5. 32
    1
      Marlin/example_configurations/Cartesio/Configuration.h
  6. 32
    1
      Marlin/example_configurations/Felix/Configuration.h
  7. 32
    1
      Marlin/example_configurations/Felix/DUAL/Configuration.h
  8. 32
    1
      Marlin/example_configurations/Hephestos/Configuration.h
  9. 32
    1
      Marlin/example_configurations/Hephestos_2/Configuration.h
  10. 32
    1
      Marlin/example_configurations/K8200/Configuration.h
  11. 32
    1
      Marlin/example_configurations/K8400/Configuration.h
  12. 32
    1
      Marlin/example_configurations/K8400/Dual-head/Configuration.h
  13. 32
    1
      Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h
  14. 32
    1
      Marlin/example_configurations/RigidBot/Configuration.h
  15. 32
    1
      Marlin/example_configurations/SCARA/Configuration.h
  16. 32
    1
      Marlin/example_configurations/TAZ4/Configuration.h
  17. 32
    1
      Marlin/example_configurations/TinyBoy2/Configuration.h
  18. 32
    1
      Marlin/example_configurations/WITBOX/Configuration.h
  19. 32
    1
      Marlin/example_configurations/adafruit/ST7565/Configuration.h
  20. 32
    1
      Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h
  21. 32
    1
      Marlin/example_configurations/delta/generic/Configuration.h
  22. 32
    1
      Marlin/example_configurations/delta/kossel_mini/Configuration.h
  23. 32
    1
      Marlin/example_configurations/delta/kossel_pro/Configuration.h
  24. 32
    1
      Marlin/example_configurations/delta/kossel_xl/Configuration.h
  25. 32
    1
      Marlin/example_configurations/makibox/Configuration.h
  26. 32
    1
      Marlin/example_configurations/tvrrug/Round2/Configuration.h

+ 1
- 0
Marlin/Conditionals_LCD.h Visa fil

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

+ 32
- 1
Marlin/Configuration.h Visa fil

1514
 //define BlinkM/CyzRgb Support
1514
 //define BlinkM/CyzRgb Support
1515
 //#define BLINKM
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
 //#define RGB_LED
1534
 //#define RGB_LED
1519
 #if ENABLED(RGB_LED)
1535
 #if ENABLED(RGB_LED)
1520
   #define RGB_LED_R_PIN 34
1536
   #define RGB_LED_R_PIN 34
1522
   #define RGB_LED_B_PIN 35
1538
   #define RGB_LED_B_PIN 35
1523
 #endif
1539
 #endif
1524
 
1540
 
1541
+/**
1542
+ * Printer Event LEDs
1543
+ *
1544
+ * During printing, the LEDs will reflect the printer status:
1545
+ *
1546
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1547
+ *  - Gradually change from violet to red as the hotend gets to temperature
1548
+ *  - Change to white to illuminate work surface
1549
+ *  - Change to green once print has finished
1550
+ *  - Turn off after the print has finished and the user has pushed a button
1551
+ */
1552
+#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1553
+  #define PRINTER_EVENT_LEDS
1554
+#endif
1555
+
1525
 /*********************************************************************\
1556
 /*********************************************************************\
1526
 * R/C SERVO support
1557
 * R/C SERVO support
1527
 * Sponsored by TrinityLabs, Reworked by codexmas
1558
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 73
- 24
Marlin/Marlin_main.cpp Visa fil

945
 
945
 
946
 #endif
946
 #endif
947
 
947
 
948
+#if HAS_COLOR_LEDS
949
+
950
+  void set_led_color(const uint8_t r, const uint8_t g, const uint8_t b) {
951
+
952
+    #if ENABLED(BLINKM)
953
+
954
+      // This variant uses i2c to send the RGB components to the device.
955
+      SendColors(r, g, b);
956
+
957
+    #else
958
+
959
+      // This variant uses 3 separate pins for the RGB components.
960
+      // If the pins can do PWM then their intensity will be set.
961
+      digitalWrite(RGB_LED_R_PIN, r ? HIGH : LOW);
962
+      digitalWrite(RGB_LED_G_PIN, g ? HIGH : LOW);
963
+      digitalWrite(RGB_LED_B_PIN, b ? HIGH : LOW);
964
+      analogWrite(RGB_LED_R_PIN, r);
965
+      analogWrite(RGB_LED_G_PIN, g);
966
+      analogWrite(RGB_LED_B_PIN, b);
967
+
968
+    #endif
969
+  }
970
+
971
+#endif // HAS_COLOR_LEDS
972
+
948
 void gcode_line_error(const char* err, bool doFlush = true) {
973
 void gcode_line_error(const char* err, bool doFlush = true) {
949
   SERIAL_ERROR_START;
974
   SERIAL_ERROR_START;
950
   serialprintPGM(err);
975
   serialprintPGM(err);
1129
         if (card_eof) {
1154
         if (card_eof) {
1130
           SERIAL_PROTOCOLLNPGM(MSG_FILE_PRINTED);
1155
           SERIAL_PROTOCOLLNPGM(MSG_FILE_PRINTED);
1131
           card.printingHasFinished();
1156
           card.printingHasFinished();
1157
+          #if ENABLED(PRINTER_EVENT_LEDS)
1158
+            LCD_MESSAGEPGM(MSG_INFO_COMPLETED_PRINTS);
1159
+            set_led_color(0, 255, 0);
1160
+            #if HAS_RESUME_CONTINUE
1161
+              KEEPALIVE_STATE(PAUSED_FOR_USER);
1162
+              wait_for_user = true;
1163
+              while (wait_for_user) idle();
1164
+              KEEPALIVE_STATE(IN_HANDLER);
1165
+            #else
1166
+              safe_delay(1000);
1167
+            #endif
1168
+            set_led_color(0, 0, 0);
1169
+          #endif
1132
           card.checkautostart(true);
1170
           card.checkautostart(true);
1133
         }
1171
         }
1134
         else if (n == -1) {
1172
         else if (n == -1) {
6084
 
6122
 
6085
   KEEPALIVE_STATE(NOT_BUSY);
6123
   KEEPALIVE_STATE(NOT_BUSY);
6086
 
6124
 
6125
+  #if ENABLED(PRINTER_EVENT_LEDS)
6126
+    const float start_temp = thermalManager.degHotend(target_extruder);
6127
+    uint8_t old_blue = 0;
6128
+  #endif
6129
+
6087
   do {
6130
   do {
6088
     // Target temperature might be changed during the loop
6131
     // Target temperature might be changed during the loop
6089
     if (target_temp != thermalManager.degTargetHotend(target_extruder)) {
6132
     if (target_temp != thermalManager.degTargetHotend(target_extruder)) {
6117
 
6160
 
6118
     const float temp = thermalManager.degHotend(target_extruder);
6161
     const float temp = thermalManager.degHotend(target_extruder);
6119
 
6162
 
6163
+    #if ENABLED(PRINTER_EVENT_LEDS)
6164
+      // Gradually change LED strip from violet to red as nozzle heats up
6165
+      if (!wants_to_cool) {
6166
+        const uint8_t blue = map(constrain(temp, start_temp, target_temp), start_temp, target_temp, 255, 0);
6167
+        if (blue != old_blue) set_led_color(255, 0, (old_blue = blue));
6168
+      }
6169
+    #endif
6170
+
6120
     #if TEMP_RESIDENCY_TIME > 0
6171
     #if TEMP_RESIDENCY_TIME > 0
6121
 
6172
 
6122
       const float temp_diff = fabs(target_temp - temp);
6173
       const float temp_diff = fabs(target_temp - temp);
6145
 
6196
 
6146
   } while (wait_for_heatup && TEMP_CONDITIONS);
6197
   } while (wait_for_heatup && TEMP_CONDITIONS);
6147
 
6198
 
6148
-  if (wait_for_heatup) LCD_MESSAGEPGM(MSG_HEATING_COMPLETE);
6199
+  if (wait_for_heatup) {
6200
+    LCD_MESSAGEPGM(MSG_HEATING_COMPLETE);
6201
+    #if ENABLED(PRINTER_EVENT_LEDS)
6202
+      set_led_color(255, 255, 255); // Set LEDs ALL WHITE
6203
+    #endif
6204
+  }
6149
 
6205
 
6150
   KEEPALIVE_STATE(IN_HANDLER);
6206
   KEEPALIVE_STATE(IN_HANDLER);
6151
 }
6207
 }
6195
 
6251
 
6196
     target_extruder = active_extruder; // for print_heaterstates
6252
     target_extruder = active_extruder; // for print_heaterstates
6197
 
6253
 
6254
+    #if ENABLED(PRINTER_EVENT_LEDS)
6255
+      const float start_temp = thermalManager.degBed();
6256
+      uint8_t old_red = 255;
6257
+    #endif
6258
+
6198
     do {
6259
     do {
6199
       // Target temperature might be changed during the loop
6260
       // Target temperature might be changed during the loop
6200
       if (target_temp != thermalManager.degTargetBed()) {
6261
       if (target_temp != thermalManager.degTargetBed()) {
6228
 
6289
 
6229
       const float temp = thermalManager.degBed();
6290
       const float temp = thermalManager.degBed();
6230
 
6291
 
6292
+      #if ENABLED(PRINTER_EVENT_LEDS)
6293
+        // Gradually change LED strip from blue to violet as bed heats up
6294
+        if (!wants_to_cool) {
6295
+          const uint8_t red = map(constrain(temp, start_temp, target_temp), start_temp, target_temp, 0, 255);
6296
+          if (red != old_red) set_led_color((old_red = red), 0, 255);
6297
+        }
6298
+      }
6299
+      #endif
6300
+
6231
       #if TEMP_BED_RESIDENCY_TIME > 0
6301
       #if TEMP_BED_RESIDENCY_TIME > 0
6232
 
6302
 
6233
         const float temp_diff = fabs(target_temp - temp);
6303
         const float temp_diff = fabs(target_temp - temp);
6771
 
6841
 
6772
 #endif // PARK_HEAD_ON_PAUSE
6842
 #endif // PARK_HEAD_ON_PAUSE
6773
 
6843
 
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
-  }
6844
+#if HAS_COLOR_LEDS
6796
 
6845
 
6797
   /**
6846
   /**
6798
    * M150: Set Status LED Color - Use R-U-B for R-G-B
6847
    * M150: Set Status LED Color - Use R-U-B for R-G-B
9388
           break;
9437
           break;
9389
       #endif
9438
       #endif
9390
 
9439
 
9391
-      #if ENABLED(BLINKM) || ENABLED(RGB_LED)
9440
+      #if HAS_COLOR_LEDS
9392
 
9441
 
9393
         case 150: // M150: Set Status LED Color
9442
         case 150: // M150: Set Status LED Color
9394
           gcode_M150();
9443
           gcode_M150();

+ 2
- 0
Marlin/SanityCheck.h Visa fil

957
   #elif ENABLED(BLINKM)
957
   #elif ENABLED(BLINKM)
958
     #error "RGB_LED and BLINKM are currently incompatible (both use M150)."
958
     #error "RGB_LED and BLINKM are currently incompatible (both use M150)."
959
   #endif
959
   #endif
960
+#elif DISABLED(BLINKM) && ENABLED(PRINTER_EVENT_LEDS)
961
+  #error "PRINTER_EVENT_LEDS requires BLINKM or RGB_LED."
960
 #endif
962
 #endif
961
 
963
 
962
 /**
964
 /**

+ 32
- 1
Marlin/example_configurations/Cartesio/Configuration.h Visa fil

1513
 //define BlinkM/CyzRgb Support
1513
 //define BlinkM/CyzRgb Support
1514
 //#define BLINKM
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
 //#define RGB_LED
1533
 //#define RGB_LED
1518
 #if ENABLED(RGB_LED)
1534
 #if ENABLED(RGB_LED)
1519
   #define RGB_LED_R_PIN 34
1535
   #define RGB_LED_R_PIN 34
1521
   #define RGB_LED_B_PIN 35
1537
   #define RGB_LED_B_PIN 35
1522
 #endif
1538
 #endif
1523
 
1539
 
1540
+/**
1541
+ * Printer Event LEDs
1542
+ *
1543
+ * During printing, the LEDs will reflect the printer status:
1544
+ *
1545
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1546
+ *  - Gradually change from violet to red as the hotend gets to temperature
1547
+ *  - Change to white to illuminate work surface
1548
+ *  - Change to green once print has finished
1549
+ *  - Turn off after the print has finished and the user has pushed a button
1550
+ */
1551
+#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1552
+  #define PRINTER_EVENT_LEDS
1553
+#endif
1554
+
1524
 /*********************************************************************\
1555
 /*********************************************************************\
1525
 * R/C SERVO support
1556
 * R/C SERVO support
1526
 * Sponsored by TrinityLabs, Reworked by codexmas
1557
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 32
- 1
Marlin/example_configurations/Felix/Configuration.h Visa fil

1497
 //define BlinkM/CyzRgb Support
1497
 //define BlinkM/CyzRgb Support
1498
 //#define BLINKM
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
 //#define RGB_LED
1517
 //#define RGB_LED
1502
 #if ENABLED(RGB_LED)
1518
 #if ENABLED(RGB_LED)
1503
   #define RGB_LED_R_PIN 34
1519
   #define RGB_LED_R_PIN 34
1505
   #define RGB_LED_B_PIN 35
1521
   #define RGB_LED_B_PIN 35
1506
 #endif
1522
 #endif
1507
 
1523
 
1524
+/**
1525
+ * Printer Event LEDs
1526
+ *
1527
+ * During printing, the LEDs will reflect the printer status:
1528
+ *
1529
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1530
+ *  - Gradually change from violet to red as the hotend gets to temperature
1531
+ *  - Change to white to illuminate work surface
1532
+ *  - Change to green once print has finished
1533
+ *  - Turn off after the print has finished and the user has pushed a button
1534
+ */
1535
+#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1536
+  #define PRINTER_EVENT_LEDS
1537
+#endif
1538
+
1508
 /*********************************************************************\
1539
 /*********************************************************************\
1509
 * R/C SERVO support
1540
 * R/C SERVO support
1510
 * Sponsored by TrinityLabs, Reworked by codexmas
1541
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 32
- 1
Marlin/example_configurations/Felix/DUAL/Configuration.h Visa fil

1497
 //define BlinkM/CyzRgb Support
1497
 //define BlinkM/CyzRgb Support
1498
 //#define BLINKM
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
 //#define RGB_LED
1517
 //#define RGB_LED
1502
 #if ENABLED(RGB_LED)
1518
 #if ENABLED(RGB_LED)
1503
   #define RGB_LED_R_PIN 34
1519
   #define RGB_LED_R_PIN 34
1505
   #define RGB_LED_B_PIN 35
1521
   #define RGB_LED_B_PIN 35
1506
 #endif
1522
 #endif
1507
 
1523
 
1524
+/**
1525
+ * Printer Event LEDs
1526
+ *
1527
+ * During printing, the LEDs will reflect the printer status:
1528
+ *
1529
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1530
+ *  - Gradually change from violet to red as the hotend gets to temperature
1531
+ *  - Change to white to illuminate work surface
1532
+ *  - Change to green once print has finished
1533
+ *  - Turn off after the print has finished and the user has pushed a button
1534
+ */
1535
+#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1536
+  #define PRINTER_EVENT_LEDS
1537
+#endif
1538
+
1508
 /*********************************************************************\
1539
 /*********************************************************************\
1509
 * R/C SERVO support
1540
 * R/C SERVO support
1510
 * Sponsored by TrinityLabs, Reworked by codexmas
1541
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 32
- 1
Marlin/example_configurations/Hephestos/Configuration.h Visa fil

1505
 //define BlinkM/CyzRgb Support
1505
 //define BlinkM/CyzRgb Support
1506
 //#define BLINKM
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
 //#define RGB_LED
1525
 //#define RGB_LED
1510
 #if ENABLED(RGB_LED)
1526
 #if ENABLED(RGB_LED)
1511
   #define RGB_LED_R_PIN 34
1527
   #define RGB_LED_R_PIN 34
1513
   #define RGB_LED_B_PIN 35
1529
   #define RGB_LED_B_PIN 35
1514
 #endif
1530
 #endif
1515
 
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)
1544
+  #define PRINTER_EVENT_LEDS
1545
+#endif
1546
+
1516
 /*********************************************************************\
1547
 /*********************************************************************\
1517
 * R/C SERVO support
1548
 * R/C SERVO support
1518
 * Sponsored by TrinityLabs, Reworked by codexmas
1549
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 32
- 1
Marlin/example_configurations/Hephestos_2/Configuration.h Visa fil

1508
 //define BlinkM/CyzRgb Support
1508
 //define BlinkM/CyzRgb Support
1509
 //#define BLINKM
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
 //#define RGB_LED
1528
 //#define RGB_LED
1513
 #if ENABLED(RGB_LED)
1529
 #if ENABLED(RGB_LED)
1514
   #define RGB_LED_R_PIN 34
1530
   #define RGB_LED_R_PIN 34
1516
   #define RGB_LED_B_PIN 35
1532
   #define RGB_LED_B_PIN 35
1517
 #endif
1533
 #endif
1518
 
1534
 
1535
+/**
1536
+ * Printer Event LEDs
1537
+ *
1538
+ * During printing, the LEDs will reflect the printer status:
1539
+ *
1540
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1541
+ *  - Gradually change from violet to red as the hotend gets to temperature
1542
+ *  - Change to white to illuminate work surface
1543
+ *  - Change to green once print has finished
1544
+ *  - Turn off after the print has finished and the user has pushed a button
1545
+ */
1546
+#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1547
+  #define PRINTER_EVENT_LEDS
1548
+#endif
1549
+
1519
 /*********************************************************************\
1550
 /*********************************************************************\
1520
 * R/C SERVO support
1551
 * R/C SERVO support
1521
 * Sponsored by TrinityLabs, Reworked by codexmas
1552
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 32
- 1
Marlin/example_configurations/K8200/Configuration.h Visa fil

1548
 //define BlinkM/CyzRgb Support
1548
 //define BlinkM/CyzRgb Support
1549
 //#define BLINKM
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
 //#define RGB_LED
1568
 //#define RGB_LED
1553
 #if ENABLED(RGB_LED)
1569
 #if ENABLED(RGB_LED)
1554
   #define RGB_LED_R_PIN 34
1570
   #define RGB_LED_R_PIN 34
1556
   #define RGB_LED_B_PIN 35
1572
   #define RGB_LED_B_PIN 35
1557
 #endif
1573
 #endif
1558
 
1574
 
1575
+/**
1576
+ * Printer Event LEDs
1577
+ *
1578
+ * During printing, the LEDs will reflect the printer status:
1579
+ *
1580
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1581
+ *  - Gradually change from violet to red as the hotend gets to temperature
1582
+ *  - Change to white to illuminate work surface
1583
+ *  - Change to green once print has finished
1584
+ *  - Turn off after the print has finished and the user has pushed a button
1585
+ */
1586
+#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1587
+  #define PRINTER_EVENT_LEDS
1588
+#endif
1589
+
1559
 /*********************************************************************\
1590
 /*********************************************************************\
1560
 * R/C SERVO support
1591
 * R/C SERVO support
1561
 * Sponsored by TrinityLabs, Reworked by codexmas
1592
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 32
- 1
Marlin/example_configurations/K8400/Configuration.h Visa fil

1514
 //define BlinkM/CyzRgb Support
1514
 //define BlinkM/CyzRgb Support
1515
 //#define BLINKM
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
 //#define RGB_LED
1534
 //#define RGB_LED
1519
 #if ENABLED(RGB_LED)
1535
 #if ENABLED(RGB_LED)
1520
   #define RGB_LED_R_PIN 34
1536
   #define RGB_LED_R_PIN 34
1522
   #define RGB_LED_B_PIN 35
1538
   #define RGB_LED_B_PIN 35
1523
 #endif
1539
 #endif
1524
 
1540
 
1541
+/**
1542
+ * Printer Event LEDs
1543
+ *
1544
+ * During printing, the LEDs will reflect the printer status:
1545
+ *
1546
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1547
+ *  - Gradually change from violet to red as the hotend gets to temperature
1548
+ *  - Change to white to illuminate work surface
1549
+ *  - Change to green once print has finished
1550
+ *  - Turn off after the print has finished and the user has pushed a button
1551
+ */
1552
+#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1553
+  #define PRINTER_EVENT_LEDS
1554
+#endif
1555
+
1525
 /*********************************************************************\
1556
 /*********************************************************************\
1526
 * R/C SERVO support
1557
 * R/C SERVO support
1527
 * Sponsored by TrinityLabs, Reworked by codexmas
1558
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 32
- 1
Marlin/example_configurations/K8400/Dual-head/Configuration.h Visa fil

1514
 //define BlinkM/CyzRgb Support
1514
 //define BlinkM/CyzRgb Support
1515
 //#define BLINKM
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
 //#define RGB_LED
1534
 //#define RGB_LED
1519
 #if ENABLED(RGB_LED)
1535
 #if ENABLED(RGB_LED)
1520
   #define RGB_LED_R_PIN 34
1536
   #define RGB_LED_R_PIN 34
1522
   #define RGB_LED_B_PIN 35
1538
   #define RGB_LED_B_PIN 35
1523
 #endif
1539
 #endif
1524
 
1540
 
1541
+/**
1542
+ * Printer Event LEDs
1543
+ *
1544
+ * During printing, the LEDs will reflect the printer status:
1545
+ *
1546
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1547
+ *  - Gradually change from violet to red as the hotend gets to temperature
1548
+ *  - Change to white to illuminate work surface
1549
+ *  - Change to green once print has finished
1550
+ *  - Turn off after the print has finished and the user has pushed a button
1551
+ */
1552
+#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1553
+  #define PRINTER_EVENT_LEDS
1554
+#endif
1555
+
1525
 /*********************************************************************\
1556
 /*********************************************************************\
1526
 * R/C SERVO support
1557
 * R/C SERVO support
1527
 * Sponsored by TrinityLabs, Reworked by codexmas
1558
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 32
- 1
Marlin/example_configurations/RepRapWorld/Megatronics/Configuration.h Visa fil

1514
 //define BlinkM/CyzRgb Support
1514
 //define BlinkM/CyzRgb Support
1515
 //#define BLINKM
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
 //#define RGB_LED
1534
 //#define RGB_LED
1519
 #if ENABLED(RGB_LED)
1535
 #if ENABLED(RGB_LED)
1520
   #define RGB_LED_R_PIN 34
1536
   #define RGB_LED_R_PIN 34
1522
   #define RGB_LED_B_PIN 35
1538
   #define RGB_LED_B_PIN 35
1523
 #endif
1539
 #endif
1524
 
1540
 
1541
+/**
1542
+ * Printer Event LEDs
1543
+ *
1544
+ * During printing, the LEDs will reflect the printer status:
1545
+ *
1546
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1547
+ *  - Gradually change from violet to red as the hotend gets to temperature
1548
+ *  - Change to white to illuminate work surface
1549
+ *  - Change to green once print has finished
1550
+ *  - Turn off after the print has finished and the user has pushed a button
1551
+ */
1552
+#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1553
+  #define PRINTER_EVENT_LEDS
1554
+#endif
1555
+
1525
 /*********************************************************************\
1556
 /*********************************************************************\
1526
 * R/C SERVO support
1557
 * R/C SERVO support
1527
 * Sponsored by TrinityLabs, Reworked by codexmas
1558
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 32
- 1
Marlin/example_configurations/RigidBot/Configuration.h Visa fil

1515
 //define BlinkM/CyzRgb Support
1515
 //define BlinkM/CyzRgb Support
1516
 //#define BLINKM
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
 //#define RGB_LED
1535
 //#define RGB_LED
1520
 #if ENABLED(RGB_LED)
1536
 #if ENABLED(RGB_LED)
1521
   #define RGB_LED_R_PIN 34
1537
   #define RGB_LED_R_PIN 34
1523
   #define RGB_LED_B_PIN 35
1539
   #define RGB_LED_B_PIN 35
1524
 #endif
1540
 #endif
1525
 
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)
1554
+  #define PRINTER_EVENT_LEDS
1555
+#endif
1556
+
1526
 /*********************************************************************\
1557
 /*********************************************************************\
1527
 * R/C SERVO support
1558
 * R/C SERVO support
1528
 * Sponsored by TrinityLabs, Reworked by codexmas
1559
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 32
- 1
Marlin/example_configurations/SCARA/Configuration.h Visa fil

1529
 //define BlinkM/CyzRgb Support
1529
 //define BlinkM/CyzRgb Support
1530
 //#define BLINKM
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
 //#define RGB_LED
1549
 //#define RGB_LED
1534
 #if ENABLED(RGB_LED)
1550
 #if ENABLED(RGB_LED)
1535
   #define RGB_LED_R_PIN 34
1551
   #define RGB_LED_R_PIN 34
1537
   #define RGB_LED_B_PIN 35
1553
   #define RGB_LED_B_PIN 35
1538
 #endif
1554
 #endif
1539
 
1555
 
1556
+/**
1557
+ * Printer Event LEDs
1558
+ *
1559
+ * During printing, the LEDs will reflect the printer status:
1560
+ *
1561
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1562
+ *  - Gradually change from violet to red as the hotend gets to temperature
1563
+ *  - Change to white to illuminate work surface
1564
+ *  - Change to green once print has finished
1565
+ *  - Turn off after the print has finished and the user has pushed a button
1566
+ */
1567
+#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1568
+  #define PRINTER_EVENT_LEDS
1569
+#endif
1570
+
1540
 /*********************************************************************\
1571
 /*********************************************************************\
1541
 * R/C SERVO support
1572
 * R/C SERVO support
1542
 * Sponsored by TrinityLabs, Reworked by codexmas
1573
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 32
- 1
Marlin/example_configurations/TAZ4/Configuration.h Visa fil

1534
 //define BlinkM/CyzRgb Support
1534
 //define BlinkM/CyzRgb Support
1535
 //#define BLINKM
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
 //#define RGB_LED
1554
 //#define RGB_LED
1539
 #if ENABLED(RGB_LED)
1555
 #if ENABLED(RGB_LED)
1540
   #define RGB_LED_R_PIN 34
1556
   #define RGB_LED_R_PIN 34
1542
   #define RGB_LED_B_PIN 35
1558
   #define RGB_LED_B_PIN 35
1543
 #endif
1559
 #endif
1544
 
1560
 
1561
+/**
1562
+ * Printer Event LEDs
1563
+ *
1564
+ * During printing, the LEDs will reflect the printer status:
1565
+ *
1566
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1567
+ *  - Gradually change from violet to red as the hotend gets to temperature
1568
+ *  - Change to white to illuminate work surface
1569
+ *  - Change to green once print has finished
1570
+ *  - Turn off after the print has finished and the user has pushed a button
1571
+ */
1572
+#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1573
+  #define PRINTER_EVENT_LEDS
1574
+#endif
1575
+
1545
 /*********************************************************************\
1576
 /*********************************************************************\
1546
 * R/C SERVO support
1577
 * R/C SERVO support
1547
 * Sponsored by TrinityLabs, Reworked by codexmas
1578
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 32
- 1
Marlin/example_configurations/TinyBoy2/Configuration.h Visa fil

1570
 //define BlinkM/CyzRgb Support
1570
 //define BlinkM/CyzRgb Support
1571
 //#define BLINKM
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
 //#define RGB_LED
1590
 //#define RGB_LED
1575
 #if ENABLED(RGB_LED)
1591
 #if ENABLED(RGB_LED)
1576
   #define RGB_LED_R_PIN 34
1592
   #define RGB_LED_R_PIN 34
1578
   #define RGB_LED_B_PIN 35
1594
   #define RGB_LED_B_PIN 35
1579
 #endif
1595
 #endif
1580
 
1596
 
1597
+/**
1598
+ * Printer Event LEDs
1599
+ *
1600
+ * During printing, the LEDs will reflect the printer status:
1601
+ *
1602
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1603
+ *  - Gradually change from violet to red as the hotend gets to temperature
1604
+ *  - Change to white to illuminate work surface
1605
+ *  - Change to green once print has finished
1606
+ *  - Turn off after the print has finished and the user has pushed a button
1607
+ */
1608
+#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1609
+  #define PRINTER_EVENT_LEDS
1610
+#endif
1611
+
1581
 /*********************************************************************\
1612
 /*********************************************************************\
1582
 * R/C SERVO support
1613
 * R/C SERVO support
1583
 * Sponsored by TrinityLabs, Reworked by codexmas
1614
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 32
- 1
Marlin/example_configurations/WITBOX/Configuration.h Visa fil

1505
 //define BlinkM/CyzRgb Support
1505
 //define BlinkM/CyzRgb Support
1506
 //#define BLINKM
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
 //#define RGB_LED
1525
 //#define RGB_LED
1510
 #if ENABLED(RGB_LED)
1526
 #if ENABLED(RGB_LED)
1511
   #define RGB_LED_R_PIN 34
1527
   #define RGB_LED_R_PIN 34
1513
   #define RGB_LED_B_PIN 35
1529
   #define RGB_LED_B_PIN 35
1514
 #endif
1530
 #endif
1515
 
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)
1544
+  #define PRINTER_EVENT_LEDS
1545
+#endif
1546
+
1516
 /*********************************************************************\
1547
 /*********************************************************************\
1517
 * R/C SERVO support
1548
 * R/C SERVO support
1518
 * Sponsored by TrinityLabs, Reworked by codexmas
1549
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 32
- 1
Marlin/example_configurations/adafruit/ST7565/Configuration.h Visa fil

1514
 //define BlinkM/CyzRgb Support
1514
 //define BlinkM/CyzRgb Support
1515
 //#define BLINKM
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
 //#define RGB_LED
1534
 //#define RGB_LED
1519
 #if ENABLED(RGB_LED)
1535
 #if ENABLED(RGB_LED)
1520
   #define RGB_LED_R_PIN 34
1536
   #define RGB_LED_R_PIN 34
1522
   #define RGB_LED_B_PIN 35
1538
   #define RGB_LED_B_PIN 35
1523
 #endif
1539
 #endif
1524
 
1540
 
1541
+/**
1542
+ * Printer Event LEDs
1543
+ *
1544
+ * During printing, the LEDs will reflect the printer status:
1545
+ *
1546
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1547
+ *  - Gradually change from violet to red as the hotend gets to temperature
1548
+ *  - Change to white to illuminate work surface
1549
+ *  - Change to green once print has finished
1550
+ *  - Turn off after the print has finished and the user has pushed a button
1551
+ */
1552
+#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1553
+  #define PRINTER_EVENT_LEDS
1554
+#endif
1555
+
1525
 /*********************************************************************\
1556
 /*********************************************************************\
1526
 * R/C SERVO support
1557
 * R/C SERVO support
1527
 * Sponsored by TrinityLabs, Reworked by codexmas
1558
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 32
- 1
Marlin/example_configurations/delta/flsun_kossel_mini/Configuration.h Visa fil

1630
 //define BlinkM/CyzRgb Support
1630
 //define BlinkM/CyzRgb Support
1631
 //#define BLINKM
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
 //#define RGB_LED
1650
 //#define RGB_LED
1635
 #if ENABLED(RGB_LED)
1651
 #if ENABLED(RGB_LED)
1636
   #define RGB_LED_R_PIN 34
1652
   #define RGB_LED_R_PIN 34
1638
   #define RGB_LED_B_PIN 35
1654
   #define RGB_LED_B_PIN 35
1639
 #endif
1655
 #endif
1640
 
1656
 
1657
+/**
1658
+ * Printer Event LEDs
1659
+ *
1660
+ * During printing, the LEDs will reflect the printer status:
1661
+ *
1662
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1663
+ *  - Gradually change from violet to red as the hotend gets to temperature
1664
+ *  - Change to white to illuminate work surface
1665
+ *  - Change to green once print has finished
1666
+ *  - Turn off after the print has finished and the user has pushed a button
1667
+ */
1668
+#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1669
+  #define PRINTER_EVENT_LEDS
1670
+#endif
1671
+
1641
 /*********************************************************************\
1672
 /*********************************************************************\
1642
 * R/C SERVO support
1673
 * R/C SERVO support
1643
 * Sponsored by TrinityLabs, Reworked by codexmas
1674
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 32
- 1
Marlin/example_configurations/delta/generic/Configuration.h Visa fil

1616
 //define BlinkM/CyzRgb Support
1616
 //define BlinkM/CyzRgb Support
1617
 //#define BLINKM
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
 //#define RGB_LED
1636
 //#define RGB_LED
1621
 #if ENABLED(RGB_LED)
1637
 #if ENABLED(RGB_LED)
1622
   #define RGB_LED_R_PIN 34
1638
   #define RGB_LED_R_PIN 34
1624
   #define RGB_LED_B_PIN 35
1640
   #define RGB_LED_B_PIN 35
1625
 #endif
1641
 #endif
1626
 
1642
 
1643
+/**
1644
+ * Printer Event LEDs
1645
+ *
1646
+ * During printing, the LEDs will reflect the printer status:
1647
+ *
1648
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1649
+ *  - Gradually change from violet to red as the hotend gets to temperature
1650
+ *  - Change to white to illuminate work surface
1651
+ *  - Change to green once print has finished
1652
+ *  - Turn off after the print has finished and the user has pushed a button
1653
+ */
1654
+#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1655
+  #define PRINTER_EVENT_LEDS
1656
+#endif
1657
+
1627
 /*********************************************************************\
1658
 /*********************************************************************\
1628
 * R/C SERVO support
1659
 * R/C SERVO support
1629
 * Sponsored by TrinityLabs, Reworked by codexmas
1660
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 32
- 1
Marlin/example_configurations/delta/kossel_mini/Configuration.h Visa fil

1612
 //define BlinkM/CyzRgb Support
1612
 //define BlinkM/CyzRgb Support
1613
 //#define BLINKM
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
 //#define RGB_LED
1632
 //#define RGB_LED
1617
 #if ENABLED(RGB_LED)
1633
 #if ENABLED(RGB_LED)
1618
   #define RGB_LED_R_PIN 34
1634
   #define RGB_LED_R_PIN 34
1620
   #define RGB_LED_B_PIN 35
1636
   #define RGB_LED_B_PIN 35
1621
 #endif
1637
 #endif
1622
 
1638
 
1639
+/**
1640
+ * Printer Event LEDs
1641
+ *
1642
+ * During printing, the LEDs will reflect the printer status:
1643
+ *
1644
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1645
+ *  - Gradually change from violet to red as the hotend gets to temperature
1646
+ *  - Change to white to illuminate work surface
1647
+ *  - Change to green once print has finished
1648
+ *  - Turn off after the print has finished and the user has pushed a button
1649
+ */
1650
+#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1651
+  #define PRINTER_EVENT_LEDS
1652
+#endif
1653
+
1623
 /*********************************************************************\
1654
 /*********************************************************************\
1624
 * R/C SERVO support
1655
 * R/C SERVO support
1625
 * Sponsored by TrinityLabs, Reworked by codexmas
1656
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 32
- 1
Marlin/example_configurations/delta/kossel_pro/Configuration.h Visa fil

1620
 //define BlinkM/CyzRgb Support
1620
 //define BlinkM/CyzRgb Support
1621
 //#define BLINKM
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
 //#define RGB_LED
1640
 //#define RGB_LED
1625
 #if ENABLED(RGB_LED)
1641
 #if ENABLED(RGB_LED)
1626
   #define RGB_LED_R_PIN 34
1642
   #define RGB_LED_R_PIN 34
1628
   #define RGB_LED_B_PIN 35
1644
   #define RGB_LED_B_PIN 35
1629
 #endif
1645
 #endif
1630
 
1646
 
1647
+/**
1648
+ * Printer Event LEDs
1649
+ *
1650
+ * During printing, the LEDs will reflect the printer status:
1651
+ *
1652
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1653
+ *  - Gradually change from violet to red as the hotend gets to temperature
1654
+ *  - Change to white to illuminate work surface
1655
+ *  - Change to green once print has finished
1656
+ *  - Turn off after the print has finished and the user has pushed a button
1657
+ */
1658
+#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1659
+  #define PRINTER_EVENT_LEDS
1660
+#endif
1661
+
1631
 /*********************************************************************\
1662
 /*********************************************************************\
1632
 * R/C SERVO support
1663
 * R/C SERVO support
1633
 * Sponsored by TrinityLabs, Reworked by codexmas
1664
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 32
- 1
Marlin/example_configurations/delta/kossel_xl/Configuration.h Visa fil

1627
 //define BlinkM/CyzRgb Support
1627
 //define BlinkM/CyzRgb Support
1628
 //#define BLINKM
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
 //#define RGB_LED
1647
 //#define RGB_LED
1632
 #if ENABLED(RGB_LED)
1648
 #if ENABLED(RGB_LED)
1633
   #define RGB_LED_R_PIN 34
1649
   #define RGB_LED_R_PIN 34
1635
   #define RGB_LED_B_PIN 35
1651
   #define RGB_LED_B_PIN 35
1636
 #endif
1652
 #endif
1637
 
1653
 
1654
+/**
1655
+ * Printer Event LEDs
1656
+ *
1657
+ * During printing, the LEDs will reflect the printer status:
1658
+ *
1659
+ *  - Gradually change from blue to violet as the heated bed gets to target temp
1660
+ *  - Gradually change from violet to red as the hotend gets to temperature
1661
+ *  - Change to white to illuminate work surface
1662
+ *  - Change to green once print has finished
1663
+ *  - Turn off after the print has finished and the user has pushed a button
1664
+ */
1665
+#if ENABLED(BLINKM) || ENABLED(RGB_LED)
1666
+  #define PRINTER_EVENT_LEDS
1667
+#endif
1668
+
1638
 /*********************************************************************\
1669
 /*********************************************************************\
1639
 * R/C SERVO support
1670
 * R/C SERVO support
1640
 * Sponsored by TrinityLabs, Reworked by codexmas
1671
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 32
- 1
Marlin/example_configurations/makibox/Configuration.h Visa fil

1517
 //define BlinkM/CyzRgb Support
1517
 //define BlinkM/CyzRgb Support
1518
 //#define BLINKM
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
 //#define RGB_LED
1537
 //#define RGB_LED
1522
 #if ENABLED(RGB_LED)
1538
 #if ENABLED(RGB_LED)
1523
   #define RGB_LED_R_PIN 34
1539
   #define RGB_LED_R_PIN 34
1525
   #define RGB_LED_B_PIN 35
1541
   #define RGB_LED_B_PIN 35
1526
 #endif
1542
 #endif
1527
 
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)
1556
+  #define PRINTER_EVENT_LEDS
1557
+#endif
1558
+
1528
 /*********************************************************************\
1559
 /*********************************************************************\
1529
 * R/C SERVO support
1560
 * R/C SERVO support
1530
 * Sponsored by TrinityLabs, Reworked by codexmas
1561
 * Sponsored by TrinityLabs, Reworked by codexmas

+ 32
- 1
Marlin/example_configurations/tvrrug/Round2/Configuration.h Visa fil

1510
 //define BlinkM/CyzRgb Support
1510
 //define BlinkM/CyzRgb Support
1511
 //#define BLINKM
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
 //#define RGB_LED
1530
 //#define RGB_LED
1515
 #if ENABLED(RGB_LED)
1531
 #if ENABLED(RGB_LED)
1516
   #define RGB_LED_R_PIN 34
1532
   #define RGB_LED_R_PIN 34
1518
   #define RGB_LED_B_PIN 35
1534
   #define RGB_LED_B_PIN 35
1519
 #endif
1535
 #endif
1520
 
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)
1549
+  #define PRINTER_EVENT_LEDS
1550
+#endif
1551
+
1521
 /*********************************************************************\
1552
 /*********************************************************************\
1522
 * R/C SERVO support
1553
 * R/C SERVO support
1523
 * Sponsored by TrinityLabs, Reworked by codexmas
1554
 * Sponsored by TrinityLabs, Reworked by codexmas

Laddar…
Avbryt
Spara