J'ai mis en place un bouton poussoir sur un GPIO pour faire un reboot ou un arrêt du Pi. C'est un script Python qui démarre grâce à une ligne dans rc.local.
J'ai suivi les instructions si dessous:
http://hardware-libre.fr/2013/07/ajoute ... ec-python/
http://hardware-libre.fr/2013/07/raspbe ... vec-python
Donc, ça fonctionne à merveille sous Raspbmc, Xbian et Volumio... Mais pas du tout sous Retropie 2.3...
Le splash screen Retropie s'affiche, mais emulstation ne démarre pas. En fait le rc.local de Retropie contient déjà une commande pour afficher l'adresse IP.
Voici donc mon rc.local:
Code: Select all
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
# Bouton extinction / reboot GPIO
sudo python /home/pi/bouton.py
exit 0
Ca clignote comme quand j'exécute le script en ssh ou terminal, comme si c'était exécuté en premier plan.
Je ne suis pas un pro, loin de là donc je me tourne vers vous.