Neopixel setup problems
-
Hey there!
I may have been staring at this for way too long but I cannot seem to make progress. I have 3 neopixels (RGBW Adafruit 2578) hooked up to my 5+ mini. If I run the following commands I get good results, but if I attempt to string multiple commands together I get some weird results.
In my config.g I issue the command:
M150 X3
All three of the LEDs illuminate Red
M150 S3 R255
The first two illuminate blue
M150 S2 B255
Now in this case, stringing the commands together, the first LED is not illuminated and the second two are green. I would expect the first LED to be white while the other two are red
M150 S1 W255 P20 F1 M150 S2 R255 P20 F0
Now it gets strange. In this case all illuminate red. Again, expecting the first two to be red while the third is white.
M150 S2 R255 P20 F1 M150 S1 W255 P20 F0
Finally... All show white
M150 S3 W255 P20 F0
I am running on a 5+ mini with 3.4.0 Beta 7. It's in stand-alone mode as well.
Is it possibly related to the beta version or am I doing something wrong?
-
@th0mpy This may help. I use an 8 neopixel.
; dameon.g ; Adafruit #1426 8 led neopixel while global.RunDaemon G4 P500 ; 500ms delay if heat.heaters[1].current > 40 ; temp M150 R255 P10 S4 F1 ; set second 4 red, and done elif heat.heaters[1].current <= 40 M150 U255 P10 S4 F1 ; set second 4 green and done if heat.heaters[0].current > 40 ; temp M150 R255 P10 S4 F0 ; set first 4 red elif heat.heaters[0].current <= 40 M150 U255 P10 S4 F0 ; set first 4 green
-
@stephen6309 I found your previous post on that, and copied your code in fact. Still have the same issue. What is your firmware version?
-
@th0mpy 3.4beta7 is the current one, started with 3.3.
If you change the S4 to S1, you should get two leds shown green , then turn red when above 40C.
Where the comments say first mean left and second means right. With the 1426 mount hole towards you.
-
@stephen6309 Right, I understand what you're saying. Boiling down your command to something which fits my setup (in a macro that I run manually):
M150 X3 S1 R255 P20 F1 M150 X3 S1 U255 P20 F1 M150 X3 S1 B255 P20 F0
Does not cause the first led to be red, second to be green, and the final one to be blue. What I actually get is: white, blank (off), and green, on the leds in that order.
I even went as far as to try it again with different LED modules. If I run the following commands I can get it to work as desired (red, green, blue)
M150 X3 S3 B255 P20 M150 X3 S2 U255 P20 M150 X3 S1 R255 P20
Based on this test it almost seems that using the commands with F1 does not work.
-
@th0mpy you are correct, this is a bug in the handling of RGBW Neopixels when F1 is used. I will fix it in RRF 3.4.0rc1.
-
This is fixed in 3.4.0beta7+2, see https://forum.duet3d.com/topic/26787/unofficial-rrf-3-4-0beta7-2-files.
-
@dc42 Excellent!!! Thanks for the update! I'll give it a whirl this weekend.