E-paper - 显示图像

材料准备

  • AmebaD [AMB21 / AMB22 / AMB23 / BW16] x 1

  • Waveshare 2.9inch e-Paper HAT (D) x 1

范例说明

在此范例中,我们使用Ameba RTL8722模块连接到Waveshare 2.9英寸e-Paper来显示一些QR码。

2.9英寸有效区域包含296×128像素,并具有白色/黑色全显示功能。每个面板都提供了一个包含gate buffer, source buffer, interface, timing control logic, oscillator等的集成电路。

您可以参考官方的 2.9 inch e-Paper HAT(D) datasheet <https://www.waveshare.net/w/upload/b/b5/2.9inch_e-Paper_(D)_Specification.pdf>`__  ,以了解有关此模块的更多信息。

e-Paper模块:

../../../../_images/image145.png

AMB21 / AMB22 接线图:

../../../../_images/image240.png ../../../../_images/image328.png

AMB23 接线图:

../../../../_images/image2-1.png ../../../../_images/image3-1.png

BW16 接线图:

../../../../_images/image2-2.png ../../../../_images/image3-2.png

BW16-TypeC Wiring Diagram:

../../../../_images/image3-3.png

首先,您需要准备296×128像素格式的图片/照片。我们可以轻松地在线找到照片尺寸调整工具,例如,Online Image Resizer.。

按照网站上的说明,然后以JPG格式下载生成的图像。

其次,我们使用 Image2LCD  工具来将传输下载的296×128图片转换成十六进制代码。您可以参考此 YouTube 连结以获取详细说明。

Download the Eink zip library, AmebaEink.zip, at https://github.com/ambiot /tree/master/Arduino_zip_libraries Then install the AmebaEink.zip. Open the “DisplayQR” example in “File” “Examples” “AmebaEink” “EinkDisplayImage”:

../../../../_images/image420.png

上传范例代码后按重置按钮,您需要等待大约 1-2 秒,e-Paper模块才能刷新屏幕。然后屏幕会先开始显示图像 5 秒,然后每 5 秒会显示 3 个不同的二维码(如下图所示,您可以扫描二维码了解更多信息)。最后,以 3 帧形式出现的 gif 将显示几秒钟。

../../../../_images/image515.png

程式码说明

[1] 我们使用Good Display GDEH029A1 2.9英寸/ 296×128解析度/部分刷新Arduino范例代码来成功获取e-Paper显示: http://www.good-display.com/product/201.html

[2] 提供有关如何在e-Paper模块上生成QR码的连结:https://eugeniopace.org/qrcode/arduino/eink/2019/07/01/qrcode-on-arduino.html