SOLVED trigger a macro with toolboard button
I tried to trigger a macro when I click on one button of ToolBoard.
this is the Gcodes on my config file:
; Input/Output M950 J1 P"!121.button0" M581 P1 T1 S1
and the macro named "trigger1.g":
;trigger1.g echo "button0" M300 S300 P200
Why this don't work ?
What actually happens?
I'm not sure that's how echo is intended to work.
T1 would mean trigger1 which I believe means pause the print. I think you'd need to start at trigger2
Trigger number 0 causes an emergency stop as if M112 had been received. Trigger number 1 causes the print to be paused as if M25 had been received. Any trigger number # greater than 1 causes the macro file sys/trigger#.g to be executed. Polling for further trigger conditions is suspended until the trigger macro file has been completed. RepRapFirmware does not wait for all queued moves to be completed before executing the macro, so you may wish to use the M400 command at the start of your macro file. If several triggers are pending, the one with the lowest trigger number takes priority.
Pseud3mys last edited by Pseud3mys
Is there a way to read directly the value of a input ?
The buttons can be used to generate triggers in the normal way. Their pin names are "button0" and "button1". The required pullup resistors are enabled automatically on these pins.
So this is possible normally, but there are no doc to do it...
M950 J1 P"!121.button0"
The port name parameter in M950 is C, not P.
It is C parameter for the pin name, and trigger1 is already used.
the corrected code:
; Input/Output M950 J1 C"!121.button0" M581 P1 T2 S1
AND the triggerX.g must be in /sys/ directory.