-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from zwyzwm/st7789
docs:ST7789
- Loading branch information
Showing
3 changed files
with
108 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
sidebar_label: 'TFT-ST7789 display' | ||
sidebar_position: 25 | ||
--- | ||
|
||
# Using TFT-ST7789 display on Duo S | ||
|
||
## Hardware wiring | ||
|
||
``` | ||
GND —— GND VCC —— VCC(3.3V) | ||
SCL —— PIN23 SDA —— PIN19 | ||
RES —— PIN50 DC —— PIN48 | ||
CS —— PIN46 BLK —— PIN44 | ||
``` | ||
|
||
## 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); | ||
``` |
54 changes: 54 additions & 0 deletions
54
i18n/zh/docusaurus-plugin-content-docs/current/duo/Accessories/ST7789.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
sidebar_label: 'TFT-ST7789 显示屏 ' | ||
sidebar_position: 25 | ||
--- | ||
|
||
# 在 Duo S 上使用 TFT-ST7789 显示屏 | ||
|
||
## 硬件接线 | ||
|
||
``` | ||
GND —— GND VCC —— VCC(3.3V) | ||
SCL —— PIN23 SDA —— PIN19 | ||
RES —— PIN50 DC —— PIN48 | ||
CS —— PIN46 BLK —— PIN44 | ||
``` | ||
|
||
## 构建运行环境 | ||
|
||
参考:https://github.com/milkv-duo/duo-examples | ||
|
||
|
||
|
||
## 编译c | ||
|
||
``` | ||
git clone https://github.com/zwyzwm/TFT-ST7789.git | ||
``` | ||
|
||
生成st7789后,运行命令 `scp st7789 [email protected]:/root/`,将程序复制到板端终端。 | ||
|
||
在板端终端上运行程序 | ||
|
||
## 显示 | ||
- > 显示颜色 | ||
``` | ||
TFT_full(RED); | ||
delay_ms(5000); | ||
TFT_full(GREEN); | ||
delay_ms(5000); | ||
TFT_full(BLUE); | ||
delay_ms(5000); | ||
``` | ||
- > 显示图片 | ||
``` | ||
Picture_display(point); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters