LEDs and power down

Hi I installed V3D leds in the vcore4 400 and they're great. I was wondering if there was a way to have them shut off when the raspberry Pi is finished writing to the SD card after you shut it down from mainsail, to let you know it's safe to power the entire printer down. (I added a power switch). Here is my current led config:
[output_pin caselight]
pin: PD13 #your control board pin number
pwm: true #enable pwm control for the led brightness
shutdown_value: 0 #brightness on printer error
value: 0.3 #value when printer turns on
cycle_time: 0.0025 #fast-ish cycle time


[gcode_macro led_on]
description: turn the LED on
gcode:
SET_PIN PIN=caselight VALUE=0.3 #adjust value for designed brightness


[gcode_macro led_off]
description: turn the LED off
gcode:
SET_PIN PIN=caselight VALUE=0 #set value to 0
[output_pin caselight]
pin: PD13 #your control board pin number
pwm: true #enable pwm control for the led brightness
shutdown_value: 0 #brightness on printer error
value: 0.3 #value when printer turns on
cycle_time: 0.0025 #fast-ish cycle time


[gcode_macro led_on]
description: turn the LED on
gcode:
SET_PIN PIN=caselight VALUE=0.3 #adjust value for designed brightness


[gcode_macro led_off]
description: turn the LED off
gcode:
SET_PIN PIN=caselight VALUE=0 #set value to 0
2 Replies
Helge Keck
Helge Keck2d ago
just make a 3 minute delayed macro with pure gcode you cant achieve what you want
billyd
billydOP2d ago
Ok thanks I figured but was hoping it could be done,
Want results from more Discord servers?
Add your server