RatRig V-Core3 without enclosure: Led mount Dayspring RatRig VCore 3 LED by Vector3d da Jake90 | Scarica il modello STL gratuito | Printables.com
BOM:
2x sup_led_enc (1).stl
2x sup_led_enc (2).stl
4x cap head screw M6x12
4x Tnut m6 3030
4x heatinsert M3
4x M3x8/10
you can buy it here: Dayspring RatRig LED - Vector 3D

printer.cfg
#############################################################################################################
### USER OVERRIDES
### Anything custom you want to add, or RatOS configuration you want to override, do it here.
#############################################################################################################
# LED
[include led.cfg]
led.cfg
(thanks to: Vector 3D and ticolaugs for the macros)
[output_pin caselight]
pin: PA3 # your control board pin number
pwm: true # enable pwm control for the led brightness
shutdown_value: 0 # brightness on printer error
value: 0 # 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.1 # 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
[gcode_macro toggle_led]
description: Toggle the LED On/Off
gcode:
{% if printer['output_pin caselight'].value == 0 %}
SET_PIN PIN=caselight VALUE=0.1 # adjust value for designed brightness
{% else %}
SET_PIN PIN=caselight VALUE=0
{%endif%}
[gcode_macro Toggle_Led2]
description: Toggle the LED On/Off
variable_state: 'off'
gcode:
{% if params.POWER is defined %}
{% set POWER = params.POWER|default(0.0)|float %}
SET_PIN PIN=caselight VALUE={POWER}
{% else %}
{% if printer['output_pin caselight'].value == 0 %}
SET_PIN PIN=caselight VALUE=0.1 # adjust value for designed
{% else %}
SET_PIN PIN=caselight VALUE=0
{% endif %}
{% endif %}
If you want to add a button to turn the LEDs on and off from the main klipperscreen page edit or create:
klipperscreen.conf
[menu __main led]
name: {{ gettext('LED') }}
icon: light
method: printer.gcode.script
params: {"script":"toggle_led"}

The author marked this model as their own original creation.