Skip to content
This repository was archived by the owner on Aug 1, 2022. It is now read-only.

Commit 61a90d7

Browse files
committed
fixed bug about camera docs and add some arduino api for lcd
1 parent 312acad commit 61a90d7

File tree

9 files changed

+219
-18
lines changed

9 files changed

+219
-18
lines changed

docs/en/api_reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# API Reference
22

3-
[中文](/zh_CN/api_reference) | English | [日本語](/ja/api_reference)
3+
[中文](zh_CN/api_reference) | English | [日本語](ja/api_reference)
44

55
| MicroPython | Arduino |
66
|:------------|:--------|

docs/en/file_to_display_null.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/en/product_documents/units/unit_esp32cam.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
## DESCRIPTION
66

7-
The **<mark>ESP32Cam</mark>** is a tiny unit based on ESP32 chip and OV2640. You can even program it through Arduino IDE.
7+
The **<mark>ESP32Cam</mark>** is a tiny unit based on ESP32 chip and OV2640. You can even program it through ESP-IDF.
88

9-
The ESP32Cam equips the ESP32 with everything necessary to program, run and develop on the wonderful chip. It also features a LiPo charger , so your ESP32Cam project can be battery-powered and truly wireless. Additionally, the board reserved the MPU6050,BME280 and an analog MIC.
9+
The ESP32Cam equips the ESP32 with everything necessary to program, run and develop on the wonderful chip. It also features a LiPo charger , so your ESP32Cam project can be battery-powered and truly wireless. Additionally, the board reserved the Welding positions of MPU6050,BME280 and an analog MIC.
1010

1111

1212
## INCLUDES
@@ -51,6 +51,8 @@ The ESP32Cam equips the ESP32 with everything necessary to program, run and deve
5151
- **[Example](https://github.com/m5stack/esp32-cam-demo/tree/m5cam) (ESP32)**
5252
- **[Datasheet](https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_cn.pdf) (ESP32)**
5353
- **[Datasheet](https://www.uctronics.com/download/cam_module/OV2640DS.pdf) (OV2640)**
54+
- **[PinMap](https://github.com/m5stack/M5-Schematic/blob/master/Units/esp32-cam/hardware_diff_with_ESP32CAM_M5Camera.md)**
55+
- **[Schematic](https://github.com/m5stack/M5-Schematic/blob/master/Units/esp32-cam/M5CAM-ESP32-A1-POWER.pdf)**
5456
- **[Quick Start](/en/quick_start/m5camera/m5camera_quick_start)**
5557
- [ESP32Cam purchase (AliExpress)](https://www.aliexpress.com/store/product/M5Stack-Official-ESP32-Camera-Module-Development-Board-OV2640-Camera-Type-C-Grove-Port-3D-Wifi-Antenna/3226069_32881414545.html)
5658

docs/en/product_documents/units/unit_m5camera.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
## DESCRIPTION
66

7-
The **<mark>M5Camera</mark>** is a tiny unit based on ESP32 chip and OV2640 <mark>including PSRAM</mark>. You can even program it through Arduino IDE.
7+
The **<mark>M5Camera</mark>** is a tiny unit based on ESP32 chip and OV2640 <mark>including PSRAM</mark>. You can even program it through ESP-IDF.
88

9-
The M5Camera equips the ESP32 with everything necessary to program, run and develop on the wonderful chip. It also features a LiPo charger (IP5306) , so your M5Camera project can be battery-powered and truly wireless. Additionally, the board reserved the MPU6050,BME280 and an analog MIC.
9+
The M5Camera equips the ESP32 with everything necessary to program, run and develop on the wonderful chip. It also features a LiPo charger (IP5306) , so your M5Camera project can be battery-powered and truly wireless. Additionally, the board reserved the Welding positions of MPU6050,BME280 and an analog MIC.
1010

1111

1212
## INCLUDES
@@ -50,6 +50,7 @@ The M5Camera equips the ESP32 with everything necessary to program, run and deve
5050
- **[Example](https://github.com/m5stack/esp32-cam-demo/tree/m5cam-psram) (ESP32)**
5151
- **[Datasheet](https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_cn.pdf) (ESP32)**
5252
- **[Datasheet](https://www.uctronics.com/download/cam_module/OV2640DS.pdf) (OV2640)**
53+
- **[PinMap](https://github.com/m5stack/M5-Schematic/blob/master/Units/m5camera/hardware_diff_with_ESP32CAM_M5Camera.md)**
5354
- **[Quick Start](/en/quick_start/m5camera/m5camera_quick_start)**
5455

5556
<figure>

docs/en/quick_start.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44

55
*This document is intended to help you set up the software environment(<mark>Arudino</mark>, <mark>MicroPython</mark>) for development of M5Stack. Through a simple example we would like to illustrate how to develop M5Stack boards, firmware(<mark>Arduino</mark>) or source files(<mark>MicroPython</mark>) download to M5Stack boards.*
66

7-
<img src="assets/img/getting_started_pics/m5stack_core.png"> | <img src="assets/img/getting_started_pics/m5camera.jpg"> | <img src="assets/img/getting_started_pics/M5Bala.jpg">
8-
---|---|---
7+
<img src="assets/img/getting_started_pics/m5stack_core.png"> | <img src="assets/img/getting_started_pics/m5camera.jpg">
8+
---|---
99
[M5StackCore](/en/quick_start/m5core/m5stack_core_quick_start) | [M5Camera](/en/quick_start/m5camera/m5camera_quick_start)
10-
<!-- | [M5BALA](/en/quick_start/bala/bala_quick_start) -->
1110

1211
<!-- ## Practice
1312

docs/zh_CN/api_reference.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
# API Reference
22

3-
中文 | [English](/en/api_reference) | [日本語](/ja/api_reference)
4-
5-
*这是MicroPython的编程API*
6-
3+
中文 | [English](en/api_reference) | [日本語](ja/api_reference)
74

85
| MicroPython | Arduino |
96
|:------------|:--------|
10-
|[LCD](zh_CN/api_reference/micropython/api_lcd) | / |
7+
|[LCD](zh_CN/api_reference/micropython/api_lcd) | [LCD](zh_CN/api_reference/arduino/api_lcd) |
118

9+
<!-- |[BUTTON](zh_CN/api_reference/micropython/api_lcd) | [BUTTON](zh_CN/api_reference/arduino/api_lcd) |
10+
|[SPEAKER](zh_CN/api_reference/micropython/api_lcd) | [SPEAKER](zh_CN/api_reference/arduino/api_lcd) | -->
1211

1312
<!-- ## [LCD](zh_CN/api_reference/micropython/api_lcd) -->
1413
<!-- ## [Peripherals](zh_CN/api_reference/peripherals/api_gpio)
Lines changed: 202 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
# LCD
2+
3+
<!-- 中文 | [English](/en/api_reference/micropython/api_lcd) | [日本語](/ja/api_reference/micropython/api_lcd) -->
4+
5+
*屏幕像素为320x240,以屏幕左上角为原点(0,0)*
6+
7+
### <mark>M5.lcd.setBrightness(uint8_t brightness);</mark>
8+
9+
**例程**
10+
```c++
11+
M5.lcd.setBrightness(200);
12+
```
13+
14+
**设置整个屏幕显示的亮度。**
15+
16+
| 参数 | 描述 |
17+
| --- | --- |
18+
| brightness | 屏幕的亮度(0-254) |
19+
20+
* * *
21+
22+
### <mark>M5.Lcd.setCursor(uint16_t x0, uint16_t y0);</mark>
23+
24+
**例程**
25+
```c++
26+
M5.lcd.setCursor(20, 40);
27+
```
28+
29+
**设置下一次要显示的起始位置(x0, y0)**
30+
31+
* * *
32+
33+
### <mark>M5.Lcd.fillScreen(uint16_t color);</mark>
34+
**例程**
35+
```c++
36+
M5.Lcd.fillScreen(BLUE)
37+
```
38+
**以指定的颜色填充整个屏幕。**
39+
40+
| 参数 | 描述 |
41+
| --- | --- |
42+
| color | 颜色值 |
43+
44+
45+
46+
* * *
47+
48+
<!--
49+
### <mark>lcd.drawPixel(x, y [,color])</mark>
50+
**例程**
51+
```python
52+
lcd.drawPixel(22,22,lcd.RED)
53+
```
54+
**在位置(x,y)处画点。**
55+
56+
*如果函数的color值没给出,则使用当前的背景颜色。*
57+
58+
| 参数 | 描述 |
59+
| --- | --- |
60+
| color | 颜色值 |
61+
62+
63+
64+
* * *
65+
66+
### <mark>lcd.drawLine(x, y, x1, y1 [,color])</mark>
67+
**例程**
68+
```python
69+
lcd.drawLine(0,0,12,12,lcd.WHITE)
70+
```
71+
**以指定的颜色从点(x,y)到点(x1,y1)画直线。**
72+
73+
*如果函数的color值没给出,则使用当前的背景颜色。*
74+
75+
| 参数 | 描述 |
76+
| --- | --- |
77+
| color | 颜色值 |
78+
79+
80+
* * *
81+
82+
### <mark>lcd.drawTriangle(x, y, x1, y1, x2, y2 [,color])</mark>
83+
84+
**例程**
85+
```python
86+
lcd.drawTriangle(22,22,69,98,51,22,lcd.RED)
87+
```
88+
89+
**以指定颜色画三角形,顶点分别为(x,y),(x1,y1)和(x2,y2)。**
90+
91+
*如果函数的color值没给出,则使用当前的背景颜色。*
92+
93+
| 参数 | 描述 |
94+
| --- | --- |
95+
| color | 颜色值 |
96+
97+
* * *
98+
99+
### <mark>lcd.fillTriangle(x, y, x1, y1, x2, y2 [,color])</mark>
100+
101+
**例程**
102+
```python
103+
lcd.fillTriangle(122, 122, 169, 198, 151, 182, lcd.RED)
104+
```
105+
**以指定颜色画<mark>填充形式</mark>的三角形,顶点分别为(x,y),(x1,y1)和(x2,y2)。**
106+
107+
*如果函数的color值没给出,则使用当前的背景颜色。*
108+
109+
| 参数 | 描述 |
110+
| --- | --- |
111+
| color | 颜色值 |
112+
113+
114+
* * *
115+
### <mark>lcd.drawRect(x, y, w, h, [,color])</mark>
116+
**例程**
117+
```python
118+
lcd.drawRect(180, 12, 122, 10, lcd.BLUE)
119+
```
120+
**以指定颜色画矩形,其中矩形左上角坐标为(x,y),宽高分别为width和height。**
121+
122+
*如果函数的color值没给出,则使用当前的背景颜色。*
123+
124+
| 参数 | 描述 |
125+
| --- | --- |
126+
| w | 图形宽(单位: 像素) |
127+
| h | 图形高(单位: 像素) |
128+
| color | 颜色值 |
129+
130+
131+
132+
133+
* * *
134+
135+
### <mark>lcd.drawRoundRect(x, y, w, h, r [,color])</mark>
136+
**例程**
137+
```python
138+
lcd.fillRoundRect(180,70,122,10,4,lcd.BLUE)
139+
```
140+
**以指定颜色画<mark>圆角</mark>矩形,其中矩形左上角坐标为(x,y),宽高分别为width和height,圆角半径为r。**
141+
142+
*如果函数的color值没给出,则使用当前的背景颜色。*
143+
144+
| 参数 | 描述 |
145+
| --- | --- |
146+
| w | 图形宽(单位: 像素) |
147+
| h | 图形高(单位: 像素) |
148+
| r | 圆角半径 |
149+
| color | 颜色值 |
150+
151+
152+
153+
154+
* * *
155+
### <mark>lcd.print(‘text’, [x, y])</mark>
156+
**例程**
157+
```python
158+
lcd.print('this is a print text function', 80, 80)
159+
```
160+
**在(x,y)处开始打印文本(字符串)text。**
161+
162+
| 参数 | 描述 |
163+
| --- | --- |
164+
| text | 要打印的内容 |
165+
166+
167+
* * *
168+
169+
### <mark>lcd.clear([color])</mark>
170+
171+
**例程**
172+
```python
173+
lcd.clear()
174+
```
175+
176+
**清屏(即以当前的背景颜色填充整个屏幕)。**
177+
178+
179+
* * *
180+
181+
### Usage
182+
183+
```python
184+
from machine import SPI, Pin
185+
from display import LCD
186+
187+
spi = SPI(1, baudrate=32000000, mosi=Pin(23), miso=Pin(19), sck=Pin(18))
188+
189+
lcd = LCD(spi = spi) #lcd init
190+
lcd.fillScreen(lcd.BLACK) #set the default background color
191+
192+
lcd.drawLine(0, 0, lcd.WHITE)
193+
lcd.drawTriangle(22, 22, 69, 98, 51, 22, lcd.RED)
194+
lcd.fillTriangle(122, 122, 169, 198, 151, 182, lcd.RED)
195+
lcd.drawCircle(180, 180, 10, lcd.BLUE)
196+
lcd.fillcircle(100, 100, 10, lcd.BLUE)
197+
lcd.drawRect(180, 12, 122, 10, lcd.BLUE)
198+
lcd.fillRect(180, 30, 122, 10, lcd.BLUE)
199+
lcd.drawRoundRect(180, 50, 122, 10, 4, lcd.BLUE)
200+
lcd.fillRoundRect(180, 70, 122, 10, 4, lcd.BLUE)
201+
lcd.print('this is a print text function', 80, 80)
202+
``` -->

docs/zh_CN/api_reference/micropython/api_lcd.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
中文 | [English](/en/api_reference/micropython/api_lcd) | [日本語](/ja/api_reference/micropython/api_lcd)
44

5+
*屏幕像素为320x240,以屏幕左上角为原点(0,0)*
6+
57
### <mark>lcd.setRotation(degree)</mark>
68

79
**例程**
@@ -163,7 +165,7 @@ lcd.fillRoundRect(180,70,122,10,4,lcd.BLUE)
163165
lcd.print('this is a print text function', 80, 80)
164166
```
165167
**在(x,y)处开始打印文本(字符串)text。**
166-
168+
167169
| 参数 | 描述 |
168170
| --- | --- |
169171
| text | 要打印的内容 |

docs/zh_CN/file_to_display_null.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)