メインコンテンツにスキップ

Using TFT-ST7789 display on Duo S

Working Principle

The principle of liquid crystal display is based on the characteristic that the transmittance of liquid crystal changes with the voltage applied to it. The TFT screen is usually composed of RGB (red, green, blue) sub-pixels. By adjusting the brightness of each sub-pixel, different colors of light are combined to achieve full-color display. And use the SPI interface.

Hardware Wiring

Document Pictures
Connection NameGNDVCCSCLSDARESDCCSBLK
Connection PinsGNDVCC (3.3V)PIN23PIN19PIN50PIN48PIN46PIN44

Build the operating environment

Reference: https://github.com/milkv-duo/duo-examples

Compile c

git clone https://github.com/zwyzwm/TFT-ST7789.git

After generating st7789, run the command scp st7789 [email protected]:/root/ to copy the program to the board terminal.

Run the program on the board terminal

Display

  • Display color

TFT_full(RED);
delay_ms(5000);
TFT_full(GREEN);
delay_ms(5000);
TFT_full(BLUE);
delay_ms(5000);
  • Display picture

Picture_display(point);