rocnet:headless-cam-fr
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | rocnet:headless-cam-fr [2019/08/19 15:54] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ======Configuration sans écran====== | ||
+ | [[: | ||
+ | [[: | ||
+ | * **[[: | ||
+ | |||
+ | |< >| | ||
+ | ^ [[https:// | ||
+ | \\ | ||
+ | \\ | ||
+ | =====Carte SD avec Raspbian Lite===== | ||
+ | Voir | ||
+ | * https:// | ||
+ | sur comment créer une image sur carte SD.\\ | ||
+ | |||
+ | \\ | ||
+ | =====Configurer la partition Boot===== | ||
+ | Crérer localement un fichier nommé " | ||
+ | < | ||
+ | country=FR | ||
+ | ctrl_interface=DIR=/ | ||
+ | update_config=1 | ||
+ | network={ | ||
+ | | ||
+ | | ||
+ | | ||
+ | } | ||
+ | </ | ||
+ | Remplacer les valeurs "< | ||
+ | |||
+ | |||
+ | Copier un fichier vide nommé " | ||
+ | {{: | ||
+ | |||
+ | - Démonter/ | ||
+ | - Insérer la carte SD dans l' | ||
+ | - Alimenter le Raspberry Pi. | ||
+ | - Attendre quelques minutes pour donner du temps à Raspbian de re-dimentionner le système de fichiers. (Avec un écran branché, sur le Mini-HDMI, la progression peut être vue.) | ||
+ | |||
+ | \\ | ||
+ | =====Mise à jour de Raspbian===== | ||
+ | < | ||
+ | ssh pi@raspberrypi | ||
+ | sudo apt update | ||
+ | sudo apt upgrade | ||
+ | </ | ||
+ | |||
+ | |||
+ | \\ | ||
+ | =====Raspi-Config===== | ||
+ | < | ||
+ | ssh pi@raspberrypi | ||
+ | sudo raspi-config | ||
+ | </ | ||
+ | {{: | ||
+ | {{: | ||
+ | {{: | ||
+ | {{: | ||
+ | {{: | ||
+ | {{: | ||
+ | |||
+ | |||
+ | |||
+ | \\ | ||
+ | =====Python Script===== | ||
+ | Décompresser le fichier {{: | ||
+ | < | ||
+ | scp cam.py pi@raspberrypi:/ | ||
+ | </ | ||
+ | |||
+ | |||
+ | \\ | ||
+ | =====Installer PiCamera===== | ||
+ | < | ||
+ | ssh pi@raspberrypi | ||
+ | sudo apt install python3-picamera | ||
+ | </ | ||
+ | |||
+ | |||
+ | \\ | ||
+ | =====Démarrer le script===== | ||
+ | < | ||
+ | ssh pi@raspberrypi | ||
+ | nano startcam.sh | ||
+ | </ | ||
+ | Créer le script "/ | ||
+ | <code bash> | ||
+ | #!/bin/sh | ||
+ | cd /home/pi | ||
+ | python3 cam.py | ||
+ | </ | ||
+ | Rendre le script exécutable: | ||
+ | < | ||
+ | chmod +x startcam.sh | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | =====Crontab===== | ||
+ | Ajouter la ligne " | ||
+ | < | ||
+ | ssh pi@raspberrypi | ||
+ | crontab -e | ||
+ | |||
+ | no crontab for pi - using an empty one | ||
+ | |||
+ | Select an editor. | ||
+ | 1. / | ||
+ | 2. / | ||
+ | 3. /bin/ed | ||
+ | |||
+ | Choose 1-3 [1]: | ||
+ | </ | ||
+ | Fermer l' | ||
+ | |||
+ | Vérifier si les changements ont été sauvegardés: | ||
+ | < | ||
+ | crontab -l | ||
+ | # Edit this file to introduce tasks to be run by cron. | ||
+ | # | ||
+ | # Each task to run has to be defined through a single line | ||
+ | # indicating with different fields when the task will be run | ||
+ | # and what command to run for the task | ||
+ | # | ||
+ | # To define the time you can provide concrete values for | ||
+ | # minute (m), hour (h), day of month (dom), month (mon), | ||
+ | # and day of week (dow) or use ' | ||
+ | # | ||
+ | # Notice that tasks will be started based on the cron's system | ||
+ | # daemon' | ||
+ | # | ||
+ | # Output of the crontab jobs (including errors) is sent through | ||
+ | # email to the user the crontab file belongs to (unless redirected). | ||
+ | # | ||
+ | # For example, you can run a backup of all your user accounts | ||
+ | # at 5 a.m every week with: | ||
+ | # 0 5 * * 1 tar -zcf / | ||
+ | # | ||
+ | # For more information see the manual pages of crontab(5) and cron(8) | ||
+ | # | ||
+ | # m h dom mon dow | ||
+ | @reboot / | ||
+ | </ | ||
+ | |||
+ | Redémarrer le Raspberry Pi: | ||
+ | < | ||
+ | sudo reboot | ||
+ | </ | ||
+ | |||
+ | |||
+ | \\ | ||
+ | =====Notes===== | ||
+ | * Les commandes **ssh** et **scp** du terminal/ | ||
+ | * Si " |
rocnet/headless-cam-fr.txt · Last modified: 2019/08/19 15:54 by 127.0.0.1