Can we discuss configuration of the Neopixel in a little depth.
I have it declared in printer config with the pin # and the count= sections and the initial colors all set to 1. And that works they all light up.
I have a simple setup with one strip of 30 lights. 10 left 10 right and 10 front of the bed. I would like to be able to index those sets of ten separately. Mainly keep the ten front lights white to light the bed and the left and right sets to show progress or any other effects my mind might dream up. But I haven’t been able to find any in depth info on configuration yet
I do not use LEDs but AFAIK grouping within one string is not supported.
There was a PR which seem to have pointed in this direction but it was not accepted:
You might be able to work around with a macro, something like
gcode:
{% for i in range(10) %}
SET_LED LED=<config_name> RED=<value> GREEN=<value> BLUE=<value> WHITE=<value> INDEX={i} TRANSMIT=1 SYNC=0
{% endfor %}
Untested but should set the first 10 LEDs. Do the same for 11 to 20 and 21 to 30
So I got this little snippet of code to work in separating my led strip into three sections of 10. Now I just need to learn some more jinja2 and start making my individual sections “DO STUFF” for me.
{% for i in range(1,11) %}
SET_LED LED=OctoEnder RED=0 GREEN=0 BLUE=1 WHITE=0 INDEX={i} TRANSMIT=1 SYNC=0
{% endfor %}
{% for i in range(11,21) %}
SET_LED LED=OctoEnder RED=0 GREEN=1 BLUE=0 WHITE=0 INDEX={i} TRANSMIT=1 SYNC=0
{% endfor %}
{% for i in range(21,31) %}
SET_LED LED=OctoEnder RED=1 GREEN=0 BLUE=0 WHITE=0 INDEX={i} TRANSMIT=1 SYNC=0
{% endfor %}
[gcode_macro L150] #Description: Macro to control 30 String Neopixels. #10 Left, 10 Center, 10 Right of printer bed #Keeping center LEDs as white/offwhite bed light
gcode:
{% set x = params.LED | default(octoender) %}
{% set mode = params.MODE %}
[display_template led_boot]
text:
{% for il in range[1,10] %}
{% for ic in range(11,21) %}
{% for ir in range(21,31) %}
SET_LED LED={x} RED=1 GREEN=0 BLUE=0 INDEX={il+1} TRANSMIT=1 SYNC=0
SET_LED LED={x} RED=1 GREEN=0 BLUE=0 INDEX={ic+1} TRANSMIT=1 SYNC=0
SET_LED LED={x} RED=1 GREEN=0 BLUE=0 INDEX={ir+1} TRANSMIT=1 SYNC=0
{% endfor %}
{% endfor %}
{% endfor %}
++++++++++++++++++++
I cant figure out what I’m doing wrong here. when I run my macro L150 LED=OctoEnder MODE=boot I expect each section of LEDs (Left, Right, and Center) to change from white to red. just as a test.
It works until I try to incorporate the DISPLAY_TEMPLATE section and the SET_LED_TEMPLATE section. Once I add that I get the following in console: