Ligne 66 : |
Ligne 66 : |
| == Running Stats on Boot == | | == Running Stats on Boot == |
| | | |
− | === Avant SystemD (Raspbian Wheezy) === | + | === Raspbian Wheezy - avant SystemD === |
| Il est très facile de démarrer le script à chaque au boot du Raspberry-Pi. | | Il est très facile de démarrer le script à chaque au boot du Raspberry-Pi. |
| | | |
− | La fastest/easiest way is to put it in '''/etc/rc.local'''
| + | L'approche la plus simple est de le mettre dans '''/etc/rc.local''' |
| | | |
− | Run '''sudo nano /etc/rc.local''' and add the line
| + | Exécuté {{fname|'''sudo nano /etc/rc.local'''}} et ajouter la ligne |
| | | |
− | <code>sudo python /home/pi/Adafruit_Python_SSD1306/examples/stats.py &</code> | + | <syntaxhighlight lang="bash"> |
| + | sudo python /home/pi/Adafruit_Python_SSD1306/examples/stats.py & |
| + | </syntaxhighlight> |
| | | |
− | on its own line right before '''exit 0'''
| + | '''juste avant le {{fname|exit 0}}''' |
| | | |
− | Then save and exit. Reboot to verify that the screen comes up on boot!
| + | Puis sauver et quitter l'éditeur nano. Redémarrer le Pi afin de voir si l'information apparaît à l'écran! |
| | | |
| {{ADFImage|RASP-PiOLED-Utiliser-05.png|640px}} | | {{ADFImage|RASP-PiOLED-Utiliser-05.png|640px}} |
| | | |
− | <a href="../../../../running-programs-automatically-on-your-tiny-computer/">For more advanced usage, check out our linux system services guide</a>
| + | |
| + | === Raspbian Jessy - avec SystemD === |
| + | |
| + | Sur base des informations ci-dessus, vous pouvez adapter le démarrage pour SystemD. |
| + | |
| + | Nous avons un tutoriel dévolu au démarrage de script Python avec SystemD. |
| + | |
| + | {{ttuto-begin}} |
| + | |
| + | {{ttuto |
| + | |label=Démarrage automatique |
| + | |descr=Démarrer automatiquement un script Python sous Raspbian. |
| + | |img=tlogo-autostart-script.jpg |
| + | |link=Rasp-AutoStart-Script |
| + | }} |
| + | |
| + | {{ttuto-end}} |
| | | |
| == Library Usage == | | == Library Usage == |