経緯
低消耗電力、停電でも表示する e-Paperが興味があり、そのRaspberry Pi HATを手に入れた。
ハードウェア
このRaspberry Pi Waveshare 2.13inch e-Paper HATは、Raspberry Pi 2/3/Zero対応する。
ソフトウェア
wiringpiのインストール
wiringpi (2.46.0) – A python interface to WiringPi 2.0 library which allows for easily
interfacing with the GPIO pins of the Raspberry Pi. Also supports i2c and
SPI.
wiringpi2 (2.32.3) – A python interface to WiringPi 2.0 library which allows for easily
interfacing with the GPIO pins of the Raspberry Pi. Also supports i2c
and SPI
root@raspberrypizero004:/home/pi# pip3 install wiringpi
gpio version: 2.46
Copyright (c) 2012-2018 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty
Type: Pi Zero-W, Revision: 01, Memory: 512MB, Maker: Sony
* Device tree is enabled.
*–> Raspberry Pi Zero W Rev 1.1
* This Raspberry Pi supports user-level GPIO access.
root@raspberrypizero004:/home/pi#
Python関連のインストール
29 sudo apt install python-rpi.gpio
30 sudo apt install python-smbus
31 sudo apt install python-serial
32 sudo apt install python-spidev
33 sudo apt install python-imaging
34 sudo raspi-config
i2c-dev
検証
39 sudo apt install p7zip-full
62 mkdir 2.13inch-e-paper-hat-b-code
63 cd 2.13inch-e-paper-hat-b-code/
64 7z x ../2.13inch-e-paper-hat-b-code.7z
65 ls
pythonで試す
71 cd raspberrypi/
73 cd python/
75 python main.py
wiringpiで試す
79 cd wiringpi/
81 make
85 ./epd
参考
- http://www.waveshare.net/wiki/2.13inch_e-Paper_HAT_(B)
- https://relativelayout.hatenablog.com/entry/2018/02/17/234348 — Waveshare 2.13inch e-Paper HAT (B)を買って3色電子ペーパーを楽しむ(環境構築編)