E-Paper - 显示用户生成的QR码
材料准备
AmebaD [AMB21 / AMB22 / AMB23 / BW16] x 1
Waveshare 2.9inch e-Paper HAT (D) x 1
范例说明
e-Paper模块:
AMB21 / AMB22 接线图:
AMB23 接线图:
BW16 接线图:
BW16-TypeC Wiring Diagram:
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”
:
根据需要修改 loop() 部分中的 URL,然后验证代码并将其上传到 Ameba 板。上传范例代码后,按重置按钮,根据您输入的 URL 生成的二维码将显示在e-Paper模块上。下面显示的二维码可以连结至我们的 Ameba IoT 网站.
程式码说明
[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