📃

Raspberry Piで初めてのEPD - Waveshare 1.54inch e-Paper Module

に公開
2026/03/06

e-Paper Displayを入手した

兎角呼称の揺れが大きいので、何と呼ぶのが適切なのか未だに分からないこのディスプレイ。電子ペーパーとかe-Paperとかe-Inkとか、複数の名前が見られる。

本記事では、LCDやOLEDという表記に寄せて、EPDという呼称で統一する。後述するファイル名にもepd_***.pyなどと出てくるから丁度良いだろう。

使用デバイス

200x200, 1.54inch E-Ink display module
引用:https://www.waveshare.com/1.54inch-e-paper-module.htm

私はAmazonで購入した。なおWaveshareの公式ストアで買えば千五百円程度($9.99)で済むので、其方で買う方がよい。

Raspberry Piは4Bを使用。

本題:Raspberry Piで動作確認

Amazonから購入したため、不良で動かないという最悪のケースも想定していた。従って先ずは返品するか否かを決するべく、動作確認を急いだ。

https://github.com/waveshareteam/e-Paper

プログラムはGitHubから入手できる。しかし手順などはWikiを見ないとよくわからない。

https://www.waveshare.com/wiki/1.54inch_e-Paper_Module_Manual#Working_With_Raspberry_Pi

事前準備

殆どWikiにある通りで、敢えて補足するようなことは少ない。

  1. 配線

配線
引用:https://www.waveshare.com/wiki/1.54inch_e-Paper_Module_Manual

配線はこの通り。間違わないように注意する。

  1. SPI有効化

今回使用するEPDは「SPI」という通信方式で制御するため、Raspberry PiがSPIを行使できなければならない。しかし大抵の場合無効になっているため、raspi-configコマンドで設定を変更し、有効にする。

Wikiにはないが、デスクトップでも同様の設定ができる。以前投稿した記事にてその画面が映っている。なお当時の環境はbookwormである。

https://zenn.dev/amenaruya/articles/7d3fde56be83bc

bookwormの場合
SPIとある

今回trixieとなった環境でこの設定を行ったところ、再起動を求められなかった。しかし不安なので一応再起動しておいた。

実行方法

CかPython、どちらか選ぶことができる。より簡単なのはどう考えてもPythonなので、本記事ではPythonの場合のみ扱う。

  1. 環境

実行環境を示しておく。

# OS environment
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 13 (trixie)"
NAME="Debian GNU/Linux"
VERSION_ID="13"
VERSION="13 (trixie)"
VERSION_CODENAME=trixie
DEBIAN_VERSION_FULL=13.3
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

# default python version
$ python3 -V
Python 3.13.5
  1. プログラムをダウンロードする

上に示したGitHubからそのまま持ってくればよい。

# clone repository
$ git clone https://github.com/waveshareteam/e-Paper.git
  1. Pythonモジュールの確認

Wikiには、numpy、PIL、spidev、gpiozeroをインストールするとある。既に揃っていれば、わざわざインストールする必要はない。実際にimport文を実行して確認すれば確実に分かる。

# check if some modules are installed
$ python3
Python 3.13.5 (main, Jun 25 2025, 18:55:22) [GCC 14.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> import PIL
>>> import spidev
>>> import gpiozero
>>>

私の環境では既に全て揃っていたので、何もインストールしていない。

インストールする場合

Wikiではaptでインストールしているが、本記事では仮想環境を使う方法を紹介する。

epdenvという名前で仮想環境を作る。なおオプション--system-site-packagesを付けており、既存のモジュールを包含している。

https://zenn.dev/amenaruya/articles/368c0d8d642eb1

$ python3 -m venv epdenv --system-site-packages
$ source epdenv/bin/activate
(epdenv) $ python
(epdenv) $ pip install numpy pillow spidev gpiozero
  1. デバイスに対応したプログラムの選択

GitHubにはサンプルプログラムが用意されているが、使用しているデバイスに応じて適切なものを選択しなければならない。

https://github.com/waveshareteam/e-Paper/tree/master/RaspberryPi_JetsonNano/python/examples

今回のデバイスは「1.54インチ」、「V2」、「白黒」らしい。よって選択するプログラムはepd_1in54_V2_test.pyとなる。

https://github.com/waveshareteam/e-Paper/blob/master/RaspberryPi_JetsonNano/python/examples/epd_1in54_V2_test.py

サイズは基板にも1.54inchとあるので、迷うことはないだろう。「V2」というのも、デバイス裏を見るとシールが貼り付けられているので分かる。詮ずるに現在生産されているものは全て「V2」となっている。

裏面
V2というシールがある
引用:https://www.waveshare.com/1.54inch-e-paper-module.htm

問題は表現色だが、白黒のみのものは無印、赤白黒のものは「(B)」、赤黄白黒のものは「(G)」と付けて呼び分けられている。

対応色の推定

極のようなもの

白黒
引用:https://www.waveshare.com/product/1.54inch-e-paper.htm

白黒赤
引用:https://www.waveshare.com/product/1.54inch-e-paper-b.htm

按ずるに電極だろうか。ケーブル(FFC)側にある突出部分が「白黒のものは一つ」、「白黒赤のものは二つ」ある。このことはこちらの動画からも確認できる。

https://www.reddit.com/r/esp32/comments/tlrcex/waveshare_154inch_b_v2_3color_epaper_w_gfx_see/

しかし「白黒赤黄」のものは一つらしい。

白黒赤黄
引用:https://www.waveshare.com/1.54inch-e-paper-g.htm?sku=30441

更には白黒赤のものであっても一つしかない画像も見られるため、確実な判定方法とは言えない。

挙動

一つ、EPDとしての性質から生じる違いとして、「画面更新(リフレッシュ)の挙動」がある。この動画を見ると瞭然、対応色が多いものはリフレッシュに時間が掛かる。

https://www.amazon.com/live/video/6fd6d065c21947aeaa8ed67a646a19b6?ref_=cm_sw_r_cp_ud_cm_sw_al__5MSGD58FVHB0H48JZ25K

EPD元へ電子ペーパーの原理には複数あるが、Waveshareのこれらはelectrophoresis(電気泳動)方式による。

The e-paper used in this product uses "microcapsule electrophoresis display" technology for image display.

平易には、白色と黒色のみを制御すればよいのか、更に赤色も制御せねばならぬか、という理屈である。制御対象が多い程、時間も掛かるだろう。

但し、「白黒のみを扱う場合」という同条件下での比較は見られないため、その真偽は定かでない。

1.54inch e-Paper Module (B)のプログラムはGitHubにもあるようだが、1.54inch e-Paper Module (G)のプログラムは見当たらない。別途専用のWikiに専用のダウンロードリンクがあるので、本記事の手順とは大きく異なることに注意。

  1. 実行

プログラムを特定したら実行する。

# run a script
$ python3 epd_1in54_V2_test.py
# venv:
(epdenv) $ python epd_1in54_V2_test.py

動作の様子

取り敢えず返品の必要がないことを確認できた。

動作1

動作2

動作3

動作4

ターミナルの表示

実行すると、今何が起こっているのか表示される。

INFO:root:epd1in54_V2 Demo
INFO:root:init and Clear
DEBUG:waveshare_epd.epd1in54_V2:full refresh
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
INFO:root:1.Drawing on the image...
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
INFO:root:2.read bmp file...
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
INFO:root:3.read bmp file on window...
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
INFO:root:4.show time...
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:partial refresh
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:Horizontal
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
INFO:root:Clear...
DEBUG:waveshare_epd.epd1in54_V2:full refresh
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy
DEBUG:waveshare_epd.epd1in54_V2:e-Paper busy release
INFO:root:Goto Sleep...
DEBUG:waveshare_epd.epdconfig:spi end
DEBUG:waveshare_epd.epdconfig:close 5V, Module enters 0 power consumption ...

跋

今回はサンプルプログラムが動いたというだけで、特に何かしたわけではない。次は自分で制御する方法を調べなければならない。

Discussion