from gpiozero import Buttonfrom subprocess import check_callfrom signal import pause
#Functions
def onGpio3Closed(): print("gpio3Pressed") print("Powers on PI When Circuit Closed, for low power stand by mode. this script will not be running. If it is running pi already on.")
def onGpio3Open():#Arcade 1up switched to OFF
print("gpio3Released") print("Arcade 1 up switched to OFF")
def onGpio17Closed(): print("gpio17Pressed") print("switched to a1up Volume -")
def onGpio17Open(): print("gpio17Released") print("switched off a1up Volume -")
def onGpio27Closed(): print("gpio27Pressed") print("switched to a1up volume +")
def onGpio27Open(): print("gpio27Released") print("switched off a1up volume +")
#Main Execution Starts Here
gpio3Btn = Button(3)gpio3Btn.when_pressed = onGpio3Closedgpio3Btn.when_released = onGpio3Open
gpio17Btn = Button(17)gpio17Btn.when_pressed = onGpio17Closedgpio17Btn.when_released = onGpio17Open
gpio27Btn = Button(27)gpio27Btn.when_pressed = onGpio27Closedgpio27Btn.when_released = onGpio27Open
pause()