How do you actually control NEOPixels?
-
M150 B155 P128 S10 F0 X1 lights them all up
M150 U155 P128 S1 F0 does set first one green on intial startup, then
M150 R155 P128 S3 F1 -- don't work after the first, but if i change F1 to F0, three light up red.But it stops changing with F1 after the first time.
I want to have 4 each show red when the bed and hotend are ho.How do you access the heater temps?
heat.heaters.0.current isn't valid.Object module doesn't show how to use it.
-
@Stephen6309 said in How do you actually control NEOPixels?:
M150 B155 P128 S10 F0 X1 lights them all up
M150 U155 P128 S1 F0 does set first one green on intial startup, then
M150 R155 P128 S3 F1 -- don't work after the first, but if i change F1 to F0, three light up red.But it stops changing with F1 after the first time.
With NeoPixels it's necessary to program the entire strip in one go. So when you use F1, RRF buffers the data until you send a command witn F0.
How do you access the heater temps?
heat.heaters.0.current isn't valid.heat.heaters[0].current
-
@dc42 I knew it would be something simple.
-
This finally works.
Lights up 4 red leds when above 40C, green <=40
Bed and T0 heater are set to 4 leds each.Make sure each if and elif M150 conmmend has a beginning space
; dameon.g ; Adafruit #1426 8 led neopixel G4 P500 ; 500ms delay if heat.heaters[0].current > 40 ; temp M150 R255 P10 S4 F1 ; set first 4 red elif heat.heaters[0].current <= 40 M150 U255 P10 S4 F1 ; set first 4 green if heat.heaters[1].current > 40 ; temp M150 R255 P10 S4 F0 ; set second 4 red, and done elif heat.heaters[1].current <= 40 M150 U255 P10 S4 F0 ; set second 4 green and done
This is in my config.g to make sure the NEOPixels are off
M150 R0 U0 B0 P5 S8 F0 ; shut off neopixel