在 ESP8266 上使用 1.8 吋 TFT Display

隨意淘來了一張 1.8 吋的 LCD,沒錯,使用 Arduino-based 開發板就是能夠這麼隨意。參考批發價格 20 RMB,全彩解析度 128×160,內建 ST7735 驅動器及 SD-card 存取。使用 SPI 3 pin 及 1 pin Data/Command 就能夠作 LCD 顯示及存取 SD 卡。獨立 1 pin 控制背光(3.3V)但應是直接電源驅動(或加工以開關以省電為目的)。而此板的電源則是需要 5V。以上可由 D1-mini pinout 所涵蓋到。所以我們只要準備 8 條杜邦線,D1-mini 板,microUSB 線,及此 TFT 模組板,便可完成本文的範例 DEMO。
於此還是需要列一下此板的 pinout。

TFT pin name | 說明 | 對應的 D1-mini |
LED/BL | 背光 | 3V3 |
SCK/CLK | SPI clock | D5 |
SDA/MOSI/DIN | SPI MOSI | D7 |
A0/DC | Command/Data | D2 |
RESET | Reset | D4 |
CS/SS | Slave select | D3 |
GND | Ground | G |
VCC | Vcc | 5V |
步驟









接下來
先期,我們可以從範例程式中去讀/改程式碼。接著,有一些就是為了 Arduino-based 顯示的點陣或向量字型與繪圖等的函式庫可供我們運用,不過通常沒那麼直觀地可被輕鬆使用,而這點也正是筆者正要開始來找個易用的來學習與運用。筆者若有心得了再來分享。
發佈留言