[quote=97712]This is what I use:
1. sudo vi /etc/rc.local
2. Add the following code at the end, just before the “exit 0″ line:
echo Waiting for controller
while ! ls /dev/js* 1>/dev/null 2>&1
echo Controller found
What this does is wait indefinitely at bootup until a controller is connected. It works perfectly for my PS3 controller over either bluetooth or USB.
What do I need to do to get it to stop after 5 seconds of not connection? I got it to work with my RetroPie but if it does not detect I would like it to eventually skip to emulationstation.
To get it to work I had to change /dev/js to /dev/input/js