Exit emulator with one button press vía gpio
-
Looking in The wiki i found this https://github.com/recalbox/recalbox-os/wiki/Add-a-start-stop-button-to-your-recalbox-(EN)
A really usefull guide, and at The bottom it says "exit emulator with one gpio button press"
But when i try to enter to that page, i cant, it sends me directly to The menú and that sucks....Any info...please?
-
@8bit_astronaut I don't know what happened with that page (there was a spanish version too).
But the creator of that script is @Phantis, so maybe he can clear things out.Edit: Hmmm, can't find him anymore.
Update: @Bug why did you erase everything? You even changed your username!
-
-
@DjLeChuck wow, didn't know about that. Can you also access the links for the scripts itself on that page?
-
@paradadf Sadly no, that's what I just see
-
Page restored: https://github.com/recalbox/recalbox-os/wiki/Enable-Gpio-button-to-close-emulator-with-only-one-button-press
But scripts are always missing...
-
So....now we cant use that script?
Gosh thats terrible....
-
@8bit_astronaut The terrible thing is that " @Bug " @Phantiss has closed his account and delete everything without any reason! ><
-
Thats even worst....
-
Any alternative to that script....?
-
@DjLeChuck maybe @substring has still the scripts somewhere because I kinda remember to have read in a thread he tested it
-
I would rather ask @supernature2k, as he told me he was creating his own script to do that.
-
Thank you! A lot of people would use it
-
@supernature2k I SUMMON YOU !!!
-
@Substring Yep, how can I help?
-
@supernature2k where is your fringing script to kill emulators via GPIO ?
-
@Substring try this:
import RPi.GPIO as GPIO import time import os import thread import datetime import socket import sys from datetime import datetime from configgen import recalboxFiles # this last one retrieves emulators bin names IPADDR = "127.0.0.1" PORTNUM = 55355 # IP and port for retroarch network commands QUIT = 3 GPIO.setwarnings(False) # no warnings GPIO.setmode(GPIO.BCM) # set up BCM GPIO numbering GPIO.setup(QUIT, GPIO.IN, pull_up_down=GPIO.PUD_UP) # GPIO on pin 3 is the GPIO 2 in BCM mode #to Reset+ # Define a threaded callback function to run in another thread when events are detected def button_pressed(channel): nwcommand="QUIT" retroarch(nwcommand) killthats**t(channel) # on quit press, trying to kill all listed emus def killthats**t(channel): if channel == QUIT: for bin in recalboxFiles.recalboxBins: print bin proc = os.path.basename(bin) print proc os.system("killall -9 "+proc) # sending network command to retroarch (only exit and reset atm) def retroarch(nwcommand): try: s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) except socket.error: print 'Failed to create socket' sys.exit() s.sendto(nwcommand, (IPADDR, PORTNUM)) GPIO.add_event_detect(QUIT, GPIO.BOTH, callback=button_pressed, bouncetime=2) while True: time.sleep(0.2)
-
@supernature2k
Does this automaticly start ES again after killing the Emulator? -
@sevenx no as ES is not killed when you launch an emu
-
@supernature2k
Do you have some time, to talk about a new project from me? Over PM?