Preisanzeige E-Paper Display
Projektübersicht
Ein E-Paper Display zur Anzeige von Preisen mit einem Raspberry Pi Zero WH und einem Waveshare E-Paper Display. Dieses Projekt zeigt, wie man dynamische Preisinformationen auf einem energieeffizienten E-Paper Display darstellt.
Schwierigkeitsgrad
Mittel
Geschätzte Zeit
1-2 Stunden
Benötigte Komponenten
Funktionen
- ✓ Automatische Preisaktualisierung
- ✓ Energieeffizientes E-Paper Display
- ✓ WLAN-Konnektivität
- ✓ Anpassbare Layouts
- ✓ API-Integration
- ✓ Batteriebetrieb möglich
Anwendungsbereiche
🏪
Einzelhandel
Dynamische Preisanzeige im Geschäft
📈
Kryptowährungen
Live-Kurse von Bitcoin & Co.
⛽
Tankstellen
Aktuelle Spritpreise anzeigen
Schritt-für-Schritt Anleitung
Vollständige Dokumentation: Waveshare Wiki
1. SPI Interface aktivieren
sudo raspi-config
3 Choose Interfacing Options -> SPI -> Yes Enable SPI interface
sudo reboot
2. Config.txt bearbeiten
sudo vi /boot/firmware/config.txt
# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
dtparam=spi=on
3. Python Abhängigkeiten installieren
sudo apt-get update
sudo apt-get install python3-pip (already installed)
sudo apt-get install python3-pil (already installed)
sudo apt-get install python3-numpy (already installed)
sudo pip3 install spidev
4. Demo ausführen
ssh pi@zero.local
cd /e-Paper/RaspberryPi_JetsonNano/python/examples
python epd_2in13_V4_test.py
5. Einfaches Rechteck anzeigen
pi@zero:~/e-Paper/RaspberryPi_JetsonNano/python/lib $ python
Python 3.11.2 (main, Nov 30 2024, 21:22:50) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from waveshare_epd import epd2in13_V4
>>> from PIL import Image,ImageDraw,ImageFont
>>> epd = epd2in13_V4.EPD()
>>> epd.init()
0
>>> epd.Clear(0xFF)
>>> image = Image.new('1', (epd.height, epd.width), 255) # 255: clear the frame
>>> draw = ImageDraw.Draw(image)
>>> draw.rectangle([(0,0),(50,50)],outline = 0)
>>> epd.display(epd.getbuffer(image))
6. Einfache Preisanzeige
import os
import sys
import time
from PIL import Image,ImageDraw,ImageFont
picdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'pic')
libdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'lib')
if os.path.exists(libdir):
sys.path.append(libdir)
from waveshare_epd import epd2in13_V4
epd = epd2in13_V4.EPD()
epd.init()
epd.Clear(0xFF)
font15 = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 15)
font24 = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 24)
font50 = ImageFont.truetype(os.path.join(picdir, 'Font.ttc'), 50)
epd.init()
image = Image.new('1', (epd.height, epd.width), 255) # 255: clear the frame
draw = ImageDraw.Draw(image)
draw.text((10, 30), '2,50 EURO', font = font50, fill = 0)
epd.display(epd.getbuffer(image))
time.sleep(2)
Projekt-Status
Aktiv
Verfügbar
Dieses Projekt ist vollständig dokumentiert und getestet.