Skip to content

Commit

Permalink
Merge pull request #72 from zwyzwm/st7789
Browse files Browse the repository at this point in the history
docs:ST7789
  • Loading branch information
carbonfix authored Nov 11, 2024
2 parents 1c9979f + ea38ee3 commit ec7ab05
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 1 deletion.
51 changes: 51 additions & 0 deletions docs/duo/Accessories/ST7789.md
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);
```
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);
```
4 changes: 3 additions & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,11 @@ const sidebars = {
collapsed: false,
link: {
type: 'doc',
id: 'duo/Accessories/Pico-8SEG-LED',
id: 'duo/Accessories/ST7789',
},
items: [
'duo/Accessories/ST7789',
'duo/Accessories/Pico-ePaper-2.13',
'duo/Accessories/Pico-8SEG-LED',
],
},
Expand Down

0 comments on commit ec7ab05

Please sign in to comment.