OrangePI Club
Can we use GPIOs to trigger the power button functionality? - Printable Version

+- OrangePI Club (http://orangepi.club)
+-- Forum: International (English) Forums (http://orangepi.club/forumdisplay.php?fid=3)
+--- Forum: *nix Distro (http://orangepi.club/forumdisplay.php?fid=4)
+---- Forum: RetrOrangePi v4 (http://orangepi.club/forumdisplay.php?fid=31)
+----- Forum: HARDWARE DISCUSSION (http://orangepi.club/forumdisplay.php?fid=37)
+----- Thread: Can we use GPIOs to trigger the power button functionality? (/showthread.php?tid=2410)



Can we use GPIOs to trigger the power button functionality? - YiorgosH - 02-06-2018

I have a Mega Drive II housing I want to use as ropi case, and I'm thinking about making the buttons on it functional.

If I connect the reset button of the MD to the GPIOs, is there a way to make it function as the Opi power button, since the latter won't be accessible?


RE: Can we use GPIOs to trigger the power button functionality? - alexkidd - 02-06-2018

GPIO is programmable, but since you only want to use the power button, connect the wires to 2 (5V) and 6 (GND).


RE: Can we use GPIOs to trigger the power button functionality? - YiorgosH - 02-07-2018

(02-06-2018, 11:45 PM)alexkidd Wrote: GPIO is programmable, but since you only want to use the power button, connect the wires to 2 (5V) and 6 (GND).

I didn't make myself clear. I want to use the orange pi power/reset button (the small black one on the side of the orange pi, with the programmable behavior via retrorangepi menu).

But instead of pushing it (which will not be possible when the board will be inside the MD housing), I was wondering if I could use a GPIO and trigger the respective action (is it a shell script or something?).


RE: Can we use GPIOs to trigger the power button functionality? - alexkidd - 02-07-2018

it should be possible with python, just like the GPIO controller support, but tbh we never tested ourselves or added any feature with direct GPIO programming.

check:
https://github.com/duxingkei33/orangepi_PC_gpio_pyH3
http://linux-sunxi.org/GPIO
Armbian forums