Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

st7789 #88

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions docs/duo/Accessories/ST7789.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ sidebar_position: 25

# Using TFT-ST7789 display on Duo S

## Hardware wiring
## 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.

```
GND —— GND VCC —— VCC(3.3V)
SCL —— PIN23 SDA —— PIN19
RES —— PIN50 DC —— PIN48
CS —— PIN46 BLK —— PIN44
## Hardware Wiring

```
<Image src='/static/docs/duo/duos/Accessories/st7789.webp' maxWidth='50%' align='center' />

| Connection Name | GND | VCC | SCL | SDA | RES | DC | CS | BLK |
|----------|------|------------|------|------|------|------|------|------|
| Connection Pins | GND | VCC (3.3V) | PIN23| PIN19| PIN50| PIN48| PIN46| PIN44|

## Build the operating environment

Expand All @@ -22,9 +23,7 @@ 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.
Expand All @@ -41,11 +40,9 @@ TFT_full(GREEN);
delay_ms(5000);
TFT_full(BLUE);
delay_ms(5000);

```
- > Display picture

```
Picture_display(point);

```
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ sidebar_position: 25

# 在 Duo S 上使用 TFT-ST7789 显示屏

## 硬件接线
## 工作原理
液晶显示的原理基于液晶的透光率随其所施电压大小而变化的特性,TFT 屏幕通常由 RGB(红、绿、蓝)子像素组成。通过调节每个子像素的亮度,结合不同颜色的光,以实现全彩显示。并且使用SPI接口。

```
GND —— GND VCC —— VCC(3.3V)
SCL —— PIN23 SDA —— PIN19
RES —— PIN50 DC —— PIN48
CS —— PIN46 BLK —— PIN44
## 硬件接线

<Image src='/static/docs/duo/duos/Accessories/st7789.webp' maxWidth='50%' align='center' />

```
| 连接名称 | GND | VCC | SCL | SDA | RES | DC | CS | BLK |
|----------|------|------------|------|------|------|------|------|------|
| 连接引脚 | GND | VCC (3.3V) | PIN23| PIN19| PIN50| PIN48| PIN46| PIN44|

## 构建运行环境

Expand All @@ -25,9 +25,7 @@ CS —— PIN46 BLK —— PIN44
## 编译c

```

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

```

生成st7789后,运行命令 `scp st7789 [email protected]:/root/`,将程序复制到板端终端。
Expand All @@ -44,11 +42,9 @@ TFT_full(GREEN);
delay_ms(5000);
TFT_full(BLUE);
delay_ms(5000);

```
- > 显示图片

```
Picture_display(point);

```
Binary file added static/docs/duo/duos/Accessories/st7789.webp
Binary file not shown.