Conditional Gcode and GPIO State
-
Re: [In addition to Conditionals](loops and maths ......)
With RRFW 3.01, is it now possible to display the state of a GPIO pin and then store the state in a variable? If so, can you show me how?
-
Conditional GCode does not (yet) have variables.
-
Ok. Can you tell me how to display the current state of the GPIO pins in the meantime?
I saw this statement in the RepRapFirmware 3.01-RC2 notes.
"Object model key sensors.inputs has been added. This lists the input states of the configured general purpose inputs." -
@code7 said in Conditional Gcode and GPIO State:
Ok. Can you tell me how to display the current state of the GPIO pins in the meantime?
I saw this statement in the RepRapFirmware 3.01-RC2 notes.
"Object model key sensors.inputs has been added. This lists the input states of the configured general purpose inputs."If you just want to display them on the console, send this:
M409 K"sensors.inputs"
The JSON response will list the states of all the inputs that you have configured using M950 with the J parameter.
-
Perfect - Thanks