📟 Time/weather/currency display using a Raspberry Pi Zero with Waveshare LCD HAT
- Raspberry Pi Zero W
- Waveshare 1.44 ST7735S LCD HAT
- Install system libraries
$ sudo apt install git cmake python3-pip python3-dev python3-pygame python3-gpiozero python3-requests libsdl2-dev libsdl2-ttf-dev
- Enable SPI
Enable SPI in Interfacing Options > SPI
in raspi-config
$ sudo raspi-config
- Add the following lines to
/etc/modules
spi-bcm2835
fbtft_device
- Add the following lines to
/etc/modprobe.d/fbtft.conf
options fbtft_device name=adafruit18_green gpios=reset:27,dc:25,cs:8,led:24 speed=40000000 bgr=1 fps=60 custom=1 height=128 width=128 rotate=90
- Add the following lines to
/boot/config.txt
disable_overscan=1
dtoverlay=pwm-2chan,pin=18,func=2,pin2=13,func2=4
hdmi_force_hotplug=1
hdmi_cvt=128 128 60 1 0 0 0
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
display_rotate=0
- Copy between
fb0
andfb1
$ git clone https://github.com/tasanakorn/rpi-fbcp
$ mkdir rpi-fbcp/build
$ cd rpi-fbcp/build/
$ cmake .. && make
$ sudo install fbcp /usr/local/bin/fbcp
To launch fbcp
automatically at startup, add the following lines to /etc/rc.local
before exit 0
:
fbcp&
To test the Raspberry Pi framebuffer configuration use the Linux Framebuffer Imageviewer:
$ sudo apt install fbi
$ sudo fbi -T 2 -d /dev/fb1 image.png
- Install requirements
$ pip install -r requirements.txt
- Run application with
sudo
(root access is necessary to modify the framebuffer).
$ sudo python3 -m pixette
- Add this to
/etc/rc.local
to run PIXETTE at startup:
$ cd /home/pi/pixette
$ sudo python3 -m pixette &
PIXETTE
is under the terms of the MIT License, following all clarifications stated in the license file.