What is the problem?
I'm trying to write a "System Command" to detect the status of a GPIO pin but I'm struggling. The command will go in the sensing section of PSU Control. This status will tell OctoPrint if the power to the printer is on or off based upon the voltage on a GPIO pin. Unfortunately I have not come across system commands before and my research has not helped me.
What did you already try to solve it?
I've tried all the standard settings in PSU control and it's currently all in reverse of what I want and the 'invert' settings are not working. I'm let to believe that using "System Command" is more reliable. My research suggested I try
gpio -g read 26
I was expecting this to output either a 0 or 1 and PSU Control would interpret this as on or off - but this doesn't work.
help here would be very very much appreciated!