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顯示:

[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