Open terjeio opened 1 year ago
Good morning, @Terjeio, I still haven't been able to get it to work.
Good morning Terjeio, I tested with a strip of rgb leds that only have one signal pin and it would be good to modify the plugin to work with those rgb leds because they only work with a signal pin and we save pins that can be used for other functions, also note that when adding the plugin fans to choose the 4 gives an error and only shows 2 in io sender configuration here I send you the code with the tests I'm doing because I plan to make a pcb that has several inputs and outputs for certain functions thanks .... RP2040N.zip
I only need the rgb.c file not the whole project... The changes I suggested in this comment has not been made, did you zip with the wrong version?
also note that when adding the plugin fans to choose the 4 gives an error
Compile time error? Which? With #define FANS_ENABLE 4
in _mymachine.h?
good day Terjeio, well doing the tests I did that with the plugin of the fans, but if I just leave it in 2 work well, turn on and off with the command, but the rgb does not work, I have worked in lathe mode and works super with the new iosender, excellent your work .... It would be nice to add a drilling profile program, I am also trying to make the #define SPINDLE_SYNC_ENABLE 1 work, although I have a servomotor that I got to change it for the one I currently have. I remain attentive thank you very much
What is your $pins output (for the aux out pins)?
It would be nice to add a drilling profile program
What is that supposed to do?
I am also trying to make the #define SPINDLE_SYNC_ENABLE 1 work
Spindle sync is not implemented for the RP2040 and I have no plans for adding it since the processor does not have a floating point unit (FPU).
Good day Terjeio, the fans are already working .... and aux outputs, the rgb plugin still can not make it work ....
Again, what is your $pins output (for the aux out pins)?
Good morning Terjeio, this is the configuration that I have. I remain attentive thank you $pins [PIN:10,Feed hold] [PIN:24,Cycle start] [PIN:22,Probe] [PIN:26,X limit min] [PIN:27,Y limit min] [PIN:28,Z limit min] [PIN:29,A limit min] [PIN:16,Aux input 0,P0] [PIN:17,Aux input 1,P1] [PIN:18,Aux input 2,P2] [PIN:0,X step] [PIN:2,Y step] [PIN:4,Z step] [PIN:7,A step] [PIN:1,X dir] [PIN:3,Y dir] [PIN:5,Z dir] [PIN:8,A dir] [PIN:9,Steppers enable] [PIN:11,Spindle PWM] [PIN:12,Spindle on] [PIN:13,Spindle direction] [PIN:15,Flood] [PIN:14,Mist] [PIN:19,Aux out 0,P0] [PIN:20,Aux out 1,P1] [PIN:21,Aux out 2,Fan 0]
I have modified and renamed rgb.c as my_plugin.c for you, it outputs pulses on pin 16 so it might work:
I leave it to you to debug, if required, as I do not have a WS2812 at hand for testing. Configure as for the first test I made for you.
good morning terjeio, tonight I'll try it and let you know thank you very much.
Good evening terjeio, I tell you that I installed the prugin and it works fine but for some reason when I restore the driver with $rst=* it keeps thinking and it crashes I will check and let you know .... thanks for your help ....
Good day terjeio, I downloaded your new code but I do not understand how this new rgb plugin works, how to configure a specific pin output led.... stay tuned thanks
Add to the map file:
#define NEOPIXELS_PIN
pin_number
The RGB plugin uses Marlin style M150 command to control the LEDs.
Note that for the RP2040 a free PIO state machine is required which may not be available. And I just updated the plugin - I forgot to do that earlier - after a core change.
I am more confused, because I have already added #define NEOPIXELS_PIN 16 to the map of my rp2040 zero but does not turn on the led, also note that it does not connect to other sender, such as candle ... I remain attentive thanks
M150 returns an error?
good morning terjeio, I do not understand what you mean rp2040 pio, and I get this error : error:20 - Unsupported or invalid g-code command found in block.
RGB plugin (_myplugin.c) is not compiled in? You have to add it to the build. If compiled in and showing up in the $I
report then the driver code failed to add RGB support.
Good morning terjeio, I made it "Add my_plugin.c to build" OFF and "Add my_plugin.c to build" ON but it still doesn't work. What do you mean by free PIO state machine???? stay tuned thanks
PIO state machines are used to handle step timings etc. and there are eight of them. Driving neopixels requires one and if none is available the driver code is not activated. The number of state machines used is dependent on board configuration, e.g. the SKR Pico configuration uses one for each axis and may thus run out of free state machines leaving none for the neopixel code.
Does the RGB plugin show up in the $I
report?
Does M150 still report an error?
shows nothing $I... shows nothing in M150 stay tuned thank you
The controller is dead and does not respond to any commands?
the controller responds with the $i command, it shows the firmware version grbl etc, but with the M150 command it shows nothing, it connects well with iosender, but does not connect with candle and lasergrbl.... thanks for your attention
If M150 does not respond with anything then your controller has crashed? No commands are accepted after it?
Good morning, it does not show anything with the M150 command, it does not turn on the rgb led.... but the controller works fine in iosender moves the motors and in $i shows all the firmware information, does not show anything of the rgb plugin as if it were not attentive.
it does not show anything with the M150 command
M150 should generate an error if the plugin is not activated - here is my $I
output, the last line is the RGB plugin:
[VER:1.1f.20240330:]
[OPT:VNMSL,100,1024,3,0]
[AXS:3:XYZ]
[NEWOPT:ENUMS,RT+,SED,RTC]
[FIRMWARE:grblHAL]
[SIGNALS:RHSP]
[NVS STORAGE:*FLASH]
[FREE MEMORY:219K]
[DRIVER:RP2040]
[DRIVER VERSION:240330]
[DRIVER OPTIONS:SDK_1.5.1]
[BOARD:PicoCNC]
[COMPATIBILITY LEVEL:2]
[AUX IO:5,8,0,1]
[PLUGIN:RGB LED (M150) v0.03]
Note that the RGB plugin is a new one, and it has a setting for the LED strip length - $536. This should default to 1 - check that it is not set to 0.
If a valid M150 command is issued, e.g. M150B100
and no error is generated the LEDs should lit up blue. If not then the pin is not connected to the LEDs or it/they are not WS2812 or WS2812 compatible?
Why Candle and Lasergrbl does not comuunicate could be due to not setting the DTR handshake signal correctly on connect. Both communicate with some other grblHAL controllers such as STM32 Nucleo based or ESP32, but not the Teensy 4 (iMXRT1062). Differences in the USB stack?
for some reason it was at zero, now the LED is blue, but I do not understand how are the functions I remain attentive thank you
but I do not understand how are the functions I remain attentive thank you
You mean the words/parameters that can be used by M150? Or how the machine state can be output to the LEDs?
good morning tejeio... yes sir, to send the status of the machine to the leds....
... send the status of the machine to the leds....
Follow the second link in my previous comment to find one implementation. hal.rgb
has to be changed to hal.rgb0
to make it work though.
You may also write your own plugin that uses the hal.rgb0 interface to control the LEDs.
I have searched for hal.rgb, but did not find any information, thank you.
Here are a few instances.
hummm, now I'm more confused, I see this plugin more complicated than the previous one, thanks for your help ...
_Originally posted by @Juank23 in https://github.com/grblHAL/Plugin_fans/issues/2#issuecomment-1640958928_