Add support for an RGBW LED

This commit is contained in:
Scott Lahteine
2017-04-11 12:58:55 -05:00
parent e7746ffee4
commit dac21ec680
27 changed files with 150 additions and 60 deletions

View File

@@ -1531,10 +1531,12 @@
*
*/
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
@@ -1548,7 +1550,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif

View File

@@ -1515,10 +1515,12 @@
*
*/
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
@@ -1532,7 +1534,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif

View File

@@ -1515,10 +1515,12 @@
*
*/
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
@@ -1532,7 +1534,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif

View File

@@ -1523,10 +1523,12 @@
*
*/
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
@@ -1540,7 +1542,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif

View File

@@ -1526,10 +1526,12 @@
*
*/
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
@@ -1543,7 +1545,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif

View File

@@ -1566,10 +1566,12 @@
*
*/
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
@@ -1583,7 +1585,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif

View File

@@ -1532,10 +1532,12 @@
*
*/
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
@@ -1549,7 +1551,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif

View File

@@ -1532,10 +1532,12 @@
*
*/
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
@@ -1549,7 +1551,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif

View File

@@ -1532,10 +1532,12 @@
*
*/
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
@@ -1549,7 +1551,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif

View File

@@ -1533,10 +1533,12 @@
*
*/
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
@@ -1550,7 +1552,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif

View File

@@ -1547,10 +1547,12 @@
*
*/
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
@@ -1564,7 +1566,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif

View File

@@ -1552,10 +1552,12 @@
*
*/
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
@@ -1569,7 +1571,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif

View File

@@ -1588,10 +1588,12 @@
*
*/
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
@@ -1605,7 +1607,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif

View File

@@ -1523,10 +1523,12 @@
*
*/
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
@@ -1540,7 +1542,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif

View File

@@ -1532,10 +1532,12 @@
*
*/
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
@@ -1549,7 +1551,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif

View File

@@ -1648,10 +1648,12 @@
*
*/
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
@@ -1665,7 +1667,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif

View File

@@ -1634,10 +1634,12 @@
*
*/
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
@@ -1651,7 +1653,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif

View File

@@ -1630,10 +1630,12 @@
*
*/
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
@@ -1647,7 +1649,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif

View File

@@ -1638,10 +1638,12 @@
*
*/
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
@@ -1655,7 +1657,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif

View File

@@ -1645,10 +1645,12 @@
*
*/
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
@@ -1662,7 +1664,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif

View File

@@ -1535,10 +1535,12 @@
*
*/
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
@@ -1552,7 +1554,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif

View File

@@ -1528,10 +1528,12 @@
*
*/
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
@@ -1545,7 +1547,7 @@
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED)
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif

View File

@@ -1521,10 +1521,27 @@
// Support for an RGB LED using 3 separate pins with optional PWM
//#define RGB_LED
#if ENABLED(RGB_LED)
//#define RGBW_LED
#if ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define RGB_LED_R_PIN 34
#define RGB_LED_G_PIN 43
#define RGB_LED_B_PIN 35
#define RGB_LED_W_PIN -1
#endif
/**
* Printer Event LEDs
*
* During printing, the LEDs will reflect the printer status:
*
* - Gradually change from blue to violet as the heated bed gets to target temp
* - Gradually change from violet to red as the hotend gets to temperature
* - Change to white to illuminate work surface
* - Change to green once print has finished
* - Turn off after the print has finished and the user has pushed a button
*/
#if ENABLED(BLINKM) || ENABLED(RGB_LED) || ENABLED(RGBW_LED)
#define PRINTER_EVENT_LEDS
#endif
/*********************************************************************\