E-Paper - 显示用户生成的QR码

材料准备

  • 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 ,以了解有关此模块的更多信息。

e-Paper模块:

../../../../_images/image147.png

AMB21 / AMB22 接线图:

../../../../_images/image244.png ../../../../_images/image330.png

AMB23 接线图:

../../../../_images/image2-12.png ../../../../_images/image3-12.png

BW16 接线图:

../../../../_images/image2-22.png ../../../../_images/image3-22.png

BW16-TypeC Wiring Diagram:

../../../../_images/image3-32.png

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” “DisplayQR”:

../../../../_images/image422.png

根据需要修改 loop() 部分中的 URL,然后验证代码并将其上传到 Ameba 板。上传范例代码后,按重置按钮,根据您输入的 URL 生成的二维码将显示在e-Paper模块上。下面显示的二维码可以连结至我们的 Ameba IoT 网站.

../../../../_images/image52.jpeg

程式码说明

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

[2] 提供如何在e-Paper模块上生成二维码的链接:https://eugeniopace.org/qrcode/arduino/eink/2019/07/01/qrcode-on-arduino.html

[3] 用于在 C 中生成 QR 码的库,针对处理和内存受限系统进行了优化:https://github.com/ricmoo/QRCode#data-capacities