Speedtest_Display_Rasberry_Pi/README.md
2026-05-25 15:17:59 +02:00

246 lines
2.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Speedtest_Display_Rasberry_Pi
# Raspberry Pi 3 TFT-Framebuffer Speedtest Display
## 1. Raspberry Pi OS installieren
Empfohlen:
- Raspberry Pi OS Lite (64 Bit)
Mit Raspberry Pi Imager auf die SD-Karte schreiben.
Während des Flashens direkt konfigurieren:
- WLAN
- SSH aktivieren
- Hostname setzen
---
## 2. System aktualisieren
```bash
sudo apt update
sudo apt full-upgrade -y
sudo reboot
```
---
## 3. SPI aktivieren
```bash
sudo raspi-config
```
Dann:
```text
Interface Options
→ SPI
→ Enable
```
Neustarten:
```bash
sudo reboot
```
---
## 4. Prüfen ob SPI aktiv ist
```bash
ls /dev/spi*
```
Erwartet:
```text
/dev/spidev0.0
/dev/spidev0.1
```
---
## 5. TFT-Display aktivieren
Datei öffnen:
```bash
sudo nano /boot/firmware/config.txt
```
Ganz unten ergänzen:
```ini
dtparam=spi=on
dtoverlay=piscreen,speed=16000000,rotate=270
```
---
## 6. Framebuffer aktivieren
Neustart:
```bash
sudo reboot
```
Danach prüfen:
```bash
ls /dev/fb*
```
Erwartet:
```text
/dev/fb0
```
---
## 7. Testbild auf Framebuffer
```bash
sudo apt install -y fbi
```
Test:
```bash
sudo fbi -T 1 -d /dev/fb0 -noverbose test.jpg
```
---
## 8. Python installieren
```bash
sudo apt install -y python3 python3-pip python3-pil python3-numpy
```
---
## 9. DejaVu Fonts installieren
```bash
sudo apt install -y fonts-dejavu-core
```
Prüfen:
```bash
ls /usr/share/fonts/truetype/dejavu/
```
---
## 10. InfluxDB Python Client installieren
```bash
pip3 install --break-system-packages influxdb-client
```
---
## 11. Python-Datei anlegen
```bash
nano /home/hubobel/down.py
```
Python-Code einfügen und speichern.
---
## 12. Testlauf
```bash
python3 /home/hubobel/down.py
```
Jetzt sollte sichtbar sein:
- Downloadrate
- Uploadrate
- Ping
- WLAN-IP
- WAN-IP
- Verlaufsgrafik
---
## 13. systemd Service anlegen
```bash
sudo nano /etc/systemd/system/down.service
```
Inhalt:
```ini
[Unit]
Description=Framebuffer Speedtest Display
After=network-online.target
[Service]
Type=simple
User=hubobel
WorkingDirectory=/home/hubobel
ExecStart=/usr/bin/python3 /home/hubobel/down.py
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
```
---
## 14. Service aktivieren
```bash
sudo systemctl daemon-reload
sudo systemctl enable down.service
sudo systemctl start down.service
```
---
## 15. Status prüfen
```bash
systemctl status down.service
```
Live-Log:
```bash
journalctl -u down.service -f
```
---
## 16. Nach Reboot testen
```bash
sudo reboot
```
---
# Ergebnis
Das System läuft danach:
- ohne Desktop
- direkt auf `/dev/fb0`
- rebootfest über systemd
- ressourcenschonend
- ideal für Embedded-Statusanzeigen