makerbase-mks / SGEN_L

MKS SGEN_L is a powerful 32-bit 3D printer control board with LPC1768. Support Marlin2.0, Smoothieware. Support MKS LCD12864B/MINI12864/LCD2004/12864 and MKS TFT Touch Screens. The motherboard integrates SPI / UART interface and works with MKS TMC2130/TMC2208 V2.0/TMC2209. It can be used after plugged in. No soldering or flying lead is required ...
https://es.aliexpress.com/item/33036918120.html?spm=a2g0o.store_home.slider_165457030.3
GNU General Public License v3.0
88 stars 61 forks source link

Adding RGB control #35

Closed Power3DPrinting closed 3 years ago

Power3DPrinting commented 4 years ago

I have some "neopixel" 24V RGB 5050 light strips one of 12 LED's and another of 6 LED's wired to 24V power and individually controlled by servo pins P1.24 and P1.25. The LED's turn on with the printer because of the 24V power but I am not getting any start up light control or status indication colors when printing. The LED's only change color when powering off the printer where they fade in different colors as they lose power. Any ideas how to get the LED's to change colors when printing?

/**

if EITHER(RGB_LED, 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

// Support for Adafruit Neopixel LED driver

define NEOPIXEL_LED //Dan: I guess the Power ARM uses neopixels because I don't have enough free pins for individual colors lol

if ENABLED(NEOPIXEL_LED)

define NEOPIXEL_TYPE NEO_GRB //NEO_GRBW // NEO_GRBW / NEO_GRB - four/three channel driver type (defined in Adafruit_NeoPixel.h)

define NEOPIXEL_PIN P1_24 //P1_26 //4 // LED driving pin

define NEOPIXEL2_TYPE NEO_GRB //NEO_GRBW //NEOPIXEL_TYPE

define NEOPIXEL2_PIN P1_25 //5

define NEOPIXEL_PIXELS 12 //30 // Number of LEDs in the strip, larger of 2 strips if 2 neopixel strips are used

define NEOPIXEL_IS_SEQUENTIAL // Sequential display for temperature change - LED by LED. Disable to change all LEDs at once.

define NEOPIXEL_BRIGHTNESS 255 //127 // Initial brightness (0-255)

define NEOPIXEL_STARTUP_TEST // Cycle through colors at startup //Dan this is for lighting debug

// Use a single Neopixel LED for static (background) lighting //#define NEOPIXEL_BKGD_LED_INDEX 0 // Index of the LED to use //#define NEOPIXEL_BKGD_COLOR { 255, 255, 255, 0 } // R, G, B, W

endif

/**

makerbase-mks commented 4 years ago

Hi! You can refer to marlin configuration.h file

/**
 * 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 ANY(BLINKM, RGB_LED, RGBW_LED, PCA9632, PCA9533, NEOPIXEL_LED)
  #define PRINTER_EVENT_LEDS
#endif
Power3DPrinting commented 4 years ago

Am I not in the configuration.h file...? I have the same thing as I showed. Not sure why it isn't working.

mks-viva commented 3 years ago

@Power3DPrinting I has test RGB function and i use the latest marlin bugfix 2.0.x, it is work, but i use MKS SGEN_L V2 motherboard

mks-viva commented 3 years ago

https://github.com/MarlinFirmware/Marlin/pull/19762 But MKS SGEN_L V1 have no pins with P1_19/P1_20/P1_21

mks-viva commented 3 years ago

@Power3DPrinting I will close this question temporarily.