Connect a external button? (Mini 5+)
my new build (Ratrig V-Cast with a Mini5+) got his LED stripes yesterday. I have the idea that I can control the stripes via one or two buttons. (on/off)
I have two macros to do that but I see no reason to connect a PanelDue just for executing two macros. Is there a way to connect real buttons to the board and execute them?
The toolboard docu says "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 I guess that it should be possible in general, isn't it? Some I/O ports should be available on the Mini5+. Can somebody help me to tight the I/O pins and the macros together?
jay_s_uk last edited by jay_s_uk
Yep, just use M581 to set up 2 triggers.
Use the IO pins.
You could even use the same button and just flip the LEDs on or off
Thanks, that was the part I was looking for:
Any trigger number # greater than 1 causes the macro file sys/trigger#.g to be executed
The idea to flip the state is even better but I did not understand how. Via a "if" condition in the gcode (trigger42.g) or what did I not understood?
jay_s_uk last edited by
Basically something like this in the trigger file.
if state.gpOut.pwm == 1 M42 P1 S0 else M42 P1 S1
Got it.. thanks! I try it later.