Trigger Macros using Arduino + Buttons
-
Hi guys im just wondering is it possible to send gcode to a duet2 to trigger a macro. I want to make a small panel with 5-10 Buttons that will Trigger macros that i create.
-
@Mastermark You don't need to send gcode - just connect your buttons directly to spare io pins. There are many examples but here is one from the documentation - https://docs.duet3d.com/en/User_manual/Tuning/Triggers
-
but i want to use my personal macros do these io pins just like home all ect ?
-
@deckingman Sorry i forgot to mention i have the Duet 2 Ethernet
-
@Mastermark said in Trigger Macros using Arduino + Buttons:
but i want to use my personal macros do these io pins just like home all ect ?
See here https://docs.duet3d.com/User_manual/Reference/Gcodes#m581-configure-external-trigger
In particular scroll down to the bit that says "Any trigger number # greater than 1 causes the macro file sys/trigger#.g to be executed". You can use your persoanl macros, but yiu need to name them "trigger2", "trigger3" etc.
-
@Mastermark said in Trigger Macros using Arduino + Buttons:
@deckingman Sorry i forgot to mention i have the Duet 2 Ethernet
In that case, you'll likely be limited to using spare end stops. If that's the case, then IIRC there are 5 available on the board of which you might be using a couple, but I think there are another 5 on the expansion connector.