Physical Buttons on Duet 3 MB6HC RRF 3.01+
-
Hi,
I tried to make a button connected to the GPIO port (io5.in) in my Duer 3 v.1.01, that, when pressed the botton, starts a macro. Unfortunately it still doesn't work.I tried to do this:
wiring:
config.g:
M950 J5 C"io5.in" ; Trigger n°5 on io5.in
M581 T5 S1 R0 ; T5=Trigger logico 5, S1=trigger occurs on an inactive-to-active, R0=whether to trigger at any timeMacro: ( Any trigger number # greater than 1 causes the macro file sys/trigger#.g )
sys/trigger5.g
for example
M106 P3 C"LUCE LED" S0 ;TURN OFF LED
I need advice to try.
-
@gianluca in your M581 command you need to add parameter P5 to tell it to monitor the GpIn 5 port that you created in the M950 command. See the M581 documentation.
-
@dc42 Does this apply to the Duet2 boards running RRF3.3 too? I am also building a control panel for my Ooznest Workbee and was just about to use the guide to configure the buttons.
-
-
-
@t3p3tony
Thank you,
the important thing is that the wiring is correct (switch between GND and io5.in).
The measurement of 3.3v is certain, I hope I have used a wrong scale of the multimeter for the measurement of the amperes.
Tonight I make other tests and redo the the measurements with the multimeter. -
Ok I've got it mostly configured now.
I'm trying to have the buttons functions setup now
Starting with the LED strip, I'd like the blue button to switch the light on/off: currently wired on a fan output.
I came up with this based on the object model plugin and gcode meta pdf but it doesn't seem to work
Any tips on fixing it?
; /sys/trigger8.g ; Blue Button only when printing ; 24V LED ON/OFF if fans[3].actualValue < 0 set fans[3].actualValue = 1 else set fans[3].actualValue = 0
Thanks!
-
@fractalengineer said in Physical Buttons on Duet 3 MB6HC RRF 3.01+:
if fans[3].actualValue < 0
Try replacing 0 by 0.5.
-
@dc42 thank you, that makes sense, however that still didn't do it; I get this error message:
4/21/2022, 2:36:28 AM Error: expected '=' in line 6 of trigger8.g
edit: Actually interesting,
I get the error message on line 6 when the fan is on 0
And line 8 when on 1I also tried using the requestedvalue objectmodel with the same result
-
@fractalengineer you can only use the 'set' command to set your own global and local variables. Use M106 commands to change the fan speed.