Support
Wiki Documentation
Support Forum
Mobile
- andRoc Android
- Rocweb Browser
- WIO-Control ESP32
- Rocview Tablet
DIY
User
Wiki writer
Special
Legal
Support
Wiki Documentation
Support Forum
Mobile
DIY
User
Wiki writer
Special
Legal
Download des Raspberry Pi Imager: Siehe
Eine SD-Card einsetzen.
Das "Raspberry Pi Imager"-Programm starten.
Auswählen:
Die SD-Card erneut einsetzen, nachdem das Erzeugen des Image auf der SD-Card beendet ist.
Die SD-Card muss im Datei-Explorer als boot
sichtbar sein.
Um den Zero in die Lage zu versetzen sich mit dem WiFi zu verbinden, muss er einige Einstellungen erhalten, um das zu tun.
Der einfachste Weg ist das Erstellen einer lokalen Text-Datei namens wpa_supplicant.conf
mit folgendem Inhalt:
country=DE ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="<my SSID1>" psk="<my PASSWORD>" key_mgmt=WPA-PSK priority=2 } network={ ssid="<my SSID2>" psk="<my PASSWORD>" key_mgmt=WPA-PSK priority=1 }
Die "<my*>"-Werte durch die realen Zugangs-Informationen des Access-Point ersetzen.
Eine leere Datei namens "SSH" und die wpa_supplicant.conf
-Datei in die Boot-Partition der SD-Card kopieren: (Unter Windows meistens Laufwerk D:
)
ssh pi@raspberrypi
Das Standard-Passwort ist raspberry
sudo apt update sudo apt upgrade
ssh pi@raspberrypi sudo apt install python3-picamera
ssh pi@raspberrypi nano startcam.sh
Das Script "/home/pi/startcam.sh" mit forlgendem Inhalt erstellen:
#!/bin/sh cd /home/pi python3 cam.py
Das Script ausführbar machen:
chmod +x startcam.sh
Die Zeile "@reboot /home/pi/startcam.sh" der crontab hinzufügen:
ssh pi@raspberrypi crontab -e no crontab for pi - using an empty one Select an editor. To change later, run 'select-editor'. 1. /bin/nano <---- easiest 2. /usr/bin/vim.tiny 3. /bin/ed Choose 1-3 [1]:
Den nano editor mit ctrl+x nach Editieren schliessen, um die Änderungen zu speichern.
Prüfen, ob die Änderungen gespeichert sind:
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 '*' in these fields (for 'any'). # # Notice that tasks will be started based on the cron's system # daemon's notion of time and timezones. # # 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 /var/backups/home.tgz /home/ # # For more information see the manual pages of crontab(5) and cron(8) # # m h dom mon dow command @reboot /home/pi/startcam.sh
Reboot des Raspberry Pi:
sudo reboot
Dienste prüfen, die für den "headless"-Betrieb nicht benötigt werden setup:
systemd-analyze blame
Nach "raspberry zero systemd-analyze blame" googeln, um Tipps zu finden, weil dies etwas außerhalb des Rahmens liegt, um es in das Wiki aufzunehmen.
Wenn ein "headless"-Zero betrieben wird, muss die Schaltung für ein Display nicht mit Strom versorgt werden.
In /etc/rc.local
die folgende Zeil hinzufügen, um HDMI beim booten zu deaktivieren.
/usr/bin/tvservice -o
(-p
für wieder aktivieren).
Ergibt ca. 25mA Reduzierung.
Um Stift 27 und 28 als normale I/O zu verwenden, eine zusätzliche Zeile in der /boot/config.txt
hinzufügen:
force_eeprom_read=0
WinSCP und FileZilla können für die Übertragung von Dateien zu und vom Raspberry Pi verwendet werden.
Für mehr Informationen siehe:
Unter bestimmten Netzwerkbedingungen muss die folgende Systemoption (sudo raspi-conf) aktiviert werden, wenn WIOpi oder CAM beim Booten nicht gestartet werden:
Im Fall eines angeschlossenen Displays, kein Headless, ohne Benutzerinteraktion.
Die lightdm
-Konfiguration editieren:
$ sudo nano /etc/lightdm/lightdm.conf
Diesen Abschnitt finden und die Extra-Optionen hinzufügen:
[Seat:*] xserver-command=X -s 0 -dpms