Skip to content

Commit

Permalink
optimize doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Neutree committed Aug 29, 2024
1 parent 30aec64 commit bc0d986
Show file tree
Hide file tree
Showing 20 changed files with 104 additions and 95 deletions.
67 changes: 36 additions & 31 deletions docs/doc/en/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,38 @@
title: MaixCAM MaixPy Quick Start
---

<div style="font-size: 1.2em;border: 2px solid green; border-color:#c33d45;padding:1em; text-align:center; background: #c33d45; color: white">
<div>
<span>MaixPy Docs and tutorial:</span>
<a target="_blank" style="color: #ffe0e0" href="https://wiki.sipeed.com/maixpy/en/">
wiki.sipeed.com/maixpy/en/
</a>
<br>
<div style="height:0.4em"></div>
<span>MaixPy examples and source code:</span>
<a target="_blank" style="color: #ffe0e0" href="https://github.com/sipeed/MaixPy">
github.com/sipeed/MaixPy
</a>
<br>
<div style="height:0.4em"></div>
<span>MaixCAM Hardware Docs:</span>
<a target="_blank" style="color: #ffe0e0" href="https://wiki.sipeed.com/maixcam">
wiki.sipeed.com/maixcam
</a>
<br>
<div style="height:0.4em"></div>
<span>MaixPy API Docs:</span>
<a target="_blank" style="color: #ffe0e0" href="https://wiki.sipeed.com/maixpy/api/index.html">
wiki.sipeed.com/maixpy/api/
</a>
</div>
<div style="padding: 1em 0 0 0">
<a target="_blank" style="color: white; font-size: 0.9em; border-radius: 0.3em; padding: 0.5em; background-color: #a80202" href="https://item.taobao.com/item.htm?id=784724795837">Taobao</a>
<a target="_blank" style="color: white; font-size: 0.9em; border-radius: 0.3em; padding: 0.5em; background-color: #a80202" href="https://www.aliexpress.com/store/911876460">AliExpress</a>
</div>
<style>
#head_links table {
width: 100%;
display: table;
}

@media screen and (max-width: 900px){
#head_links th, #head_links td {
/* padding: 8px; */
font-size: 0.9em;
padding: 0.1em 0.05em;
}
}
</style>

<div id="head_links">

| Resource Summary | Link |
| :-------------------------:| :-------------------------------------------------------------------------------------:|
| MaixPy Tutorial Documentation 📖 | [wiki.sipeed.com/maixpy/en/](https://wiki.sipeed.com/maixpy/en/) |
| MaixPy Examples and Source Code <img src="/static/image/github-fill.svg" style="height: 1.5em;vertical-align: middle;"> | [github.com/sipeed/MaixPy](https://github.com/sipeed/MaixPy) |
| MaixCAM Hardware Documentation 📷 | [wiki.sipeed.com/maixcam](https://wiki.sipeed.com/maixcam) |
| MaixPy API Documentation 📚 | [wiki.sipeed.com/maixpy/api/](https://wiki.sipeed.com/maixpy/api/index.html) |
| MaixHub App Store 📦 | [maixhub.com/app](https://maixhub.com/app) |
| MaixHub Sharing Square 🎲 | [maixhub.com/share](https://maixhub.com/share) |

</div>
<div style="font-size: 1.2em;padding:1em; text-align:center; color: white">
<div style="padding: 1em 0 0 0">
<a target="_blank" style="color: white; font-size: 0.9em; border-radius: 0.3em; padding: 0.5em; background-color: #c33d45" href="https://item.taobao.com/item.htm?id=784724795837">Taobao</a>
<a target="_blank" style="color: white; font-size: 0.9em; border-radius: 0.3em; padding: 0.5em; background-color: #c33d45" href="https://www.aliexpress.com/store/911876460">AliExpress</a>
</div>
</div>
<br>

Expand All @@ -52,6 +55,8 @@ title: MaixCAM MaixPy Quick Start

>! Note that currently only the MaixCAM development board is supported. Other development boards with the same chip are not supported, including Sipeed's development boards with the same chip. Please be careful not to purchase the wrong board, which could result in unnecessary waste of time and money.
## For no screen devies

If you use screenless version, please refer to the [Quick Start (Screenless Version)](./README_no_screen.md) document.


Expand Down Expand Up @@ -137,10 +142,10 @@ Here is the translation:
.. details::Method Two: Driver Installation on Different Computer Systems:
:open: true
By default, there are two types of USB virtual network adapter drivers (NCM and RNDIS drivers) to meet the needs of different systems. You can also disable the unused virtual network adapter on the device under `Settings` -> `USB Settings`:
* **Windows**: All Windows systems will automatically install the RNDIS driver, while only Windows 11 will automatically install the NCM driver. As long as one of the drivers works, it is sufficient.
* **Windows**: All Windows systems will automatically install the RNDIS driver, while only Windows 11 will automatically install the NCM driver. As long as **one of the drivers works**, it is sufficient.
* Open Task Manager -> Performance, and you should see a virtual Ethernet with an IP address such as `10.131.167.100`, which is the computer's IP address. The device's IP address is the same but with the last digit changed to `1`, i.e., `10.131.167.1`. If you are using Windows 11, you will see two virtual network adapters; you can use either IP address.
* Additionally, you can open `Device Manager` (search for `Device Manager` in the search bar). The RNDIS and NCM drivers should be correctly installed, as shown below:
![RNDIS ok](../../static/image/rndis_windows.jpg) ![NCM ok](../../static/image/windows_ncm_ok.png)
![RNDIS ok](../../static/image/windows_rndis_ok.png) ![NCM ok](../../static/image/windows_ncm_ok.png)
* **Linux**: No additional setup is required. Simply plug in the USB cable. Use `ifconfig` or `ip addr` to see the `usb0` and `usb1` network interfaces, and either IP address can be used. **Note**: The IP address you see, such as `10.131.167.100`, is the computer's IP address, and the device's IP address is the same but with the last digit changed to `1`, i.e., `10.131.167.1`.
* **MacOS**: Check for the `usb` network adapter under `System Settings` -> `Network`. **Note**: The IP address you see, such as `10.131.167.100`, is the computer's IP address, and the device's IP address is the same but with the last digit changed to `1`, i.e., `10.131.167.1`.

Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/peripheral/adc.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ See the ADC [API documentation](../../../api/maix/peripheral/adc.md) for a detai

MaixCAM elicits an IO that connects to the ADC, this IO is GPIO B3.

![](http://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)
![](https://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)

This IO is ADC by default and does not require additional configuration.

Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/peripheral/gpio.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Using GPIO allows you to control pins for input or output high and low levels, w
First, we need to know which pins and GPIOs the device has. For MaixCAM, each pin corresponds to a GPIO controller, as shown in the figure:

![](http://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)
![](https://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)

It is important to note that pins can be used not only as GPIOs but also for other functions like PWM. Before using them, we need to set the pin function to GPIO.

Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/peripheral/i2c.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: Using I2C with MaixCAM MaixPy
The `I2C` and corresponding pins of `MaixCAM` can be seen in the diagram:

![](http://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)
![](https://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)

For MaixCAM, due to limited pin resources, the pins for `I2C1` and `I2C3` overlap with those of the WiFi module (SDIO1). Therefore, you can only use either WiFi or hardware I2C, but not both. Additionally, there is an `I2C5`, which is simulated by software at the lower driver level. It is recommended to use this one, as the drivers are already set up, and its use is the same as using hardware `I2C`.

Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/peripheral/pinmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ With Pinmap, we can set the specified chip pin for the specified function.

The following diagram lists the pin numbers and their functions on the MaixCAM board.

![](http://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)
![](https://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)

Or read the [SG2002 Chip Manual](https://cn.dl.sipeed.com/fileList/LICHEE/LicheeRV_Nano/07_Datasheet/SG2002_Preliminary_Datasheet_V1.0-alpha_CN.pdf) Pinmux section for the remaining pin numbers and functions.

Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/peripheral/pwm.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ To use `PWM` in MaixPy (v4), first set the pin function to `PWM` using `pinmap`.

Each `PWM` corresponds to a specific pin, as shown in the pin diagram of MaixCAM:

![](http://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)
![](https://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)

We recommend using `PWM6` and `PWM7`.

Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/peripheral/spi.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ In terms of communication protocols, SPI behavior is generally like this:

This is the pinout of MaixCAM.

![](http://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)
![](https://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)

You need to use `maix.peripheral.pinmap` to complete the pin mapping for SPI before use.

Expand Down
2 changes: 1 addition & 1 deletion docs/doc/en/peripheral/uart.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ If you use the callback function method to receive data, do not use the `read` f

Each pin may correspond to different peripheral functions, which is also known as pin multiplexing. As shown below, each pin corresponds to different functions. For example, pin `A17` (silkscreen identification on the board) corresponds to `GPIOA17`, `UART0_RX`, and `PWM5` functions. The default function is `UART0_RX`.

![](http://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)
![](https://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)

By default, you can directly use `UART0` as shown above. For other serial port pins, they are not set to the serial peripheral function by default, so you need to set the mapping to use other serial ports. Use `pinmap.set_pin_function` to set it.

Expand Down
75 changes: 38 additions & 37 deletions docs/doc/zh/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,39 @@
title: MaixCAM MaixPy 快速开始
---

<div style="font-size: 1.2em;border: 2px solid green; border-color:#c33d45;padding:1em; text-align:center; background: #c33d45; color: white">
<div>
<span>MaixPy 教程文档:</span>
<a target="_blank" style="color: #ffe0e0" href="https://wiki.sipeed.com/maixpy">
wiki.sipeed.com/maixpy
</a>
<br>
<div style="height:0.4em"></div>
<span>MaixPy 例程和源码:</span>
<a target="_blank" style="color: #ffe0e0" href="https://github.com/sipeed/MaixPy">
github.com/sipeed/MaixPy
</a>
<br>
<div style="height:0.4em"></div>
<span>MaixCAM 硬件资料:</span>
<a target="_blank" style="color: #ffe0e0" href="https://wiki.sipeed.com/maixcam">
wiki.sipeed.com/maixcam
</a>
<br>
<div style="height:0.4em"></div>
<span>MaixPy API 文档:</span>
<a target="_blank" style="color: #ffe0e0" href="https://wiki.sipeed.com/maixpy/api/index.html">
wiki.sipeed.com/maixpy/api/
</a>
<br>
<div style="height:0.4em"></div>
<span>MaixPy 视频和教程:</span>
<a target="_blank" style="color: #ffe0e0" href="https://search.bilibili.com/all?keyword=maixcam&from_source=webtop_search&spm_id_from=333.1007&search_source=5">
B站搜 MaixCAM 或 MaixPy
</a>
</div>
<div style="padding: 1em 0 0 0">
<a target="_blank" style="color: white; font-size: 0.9em; border-radius: 0.3em; padding: 0.5em; background-color: #a80202" href="https://item.taobao.com/item.htm?id=784724795837">淘宝</a>
<a target="_blank" style="color: white; font-size: 0.9em; border-radius: 0.3em; padding: 0.5em; background-color: #a80202" href="https://www.aliexpress.com/store/911876460">速卖通</a>
</div>
<style>
#head_links table {
width: 100%;
display: table;
}

@media screen and (max-width: 900px){
#head_links th, #head_links td {
/* padding: 8px; */
font-size: 0.9em;
padding: 0.1em 0.05em;
}
}
</style>

<div id="head_links">

| 资源汇总 | 链接 |
| :-------------------------: | :-------------------------------------------------------------------------------------:|
| MaixPy 教程文档 📖 | [wiki.sipeed.com/maixpy](https://wiki.sipeed.com/maixpy) |
| MaixPy 例程和源码 <img src="/static/image/github-fill.svg" style="height: 1.5em;vertical-align: middle;"> | [github.com/sipeed/MaixPy](https://github.com/sipeed/MaixPy) |
| MaixCAM 硬件资料 📷 | [wiki.sipeed.com/maixcam](https://wiki.sipeed.com/maixcam) |
| MaixPy API 文档 📚 | [wiki.sipeed.com/maixpy/api/](https://wiki.sipeed.com/maixpy/api/index.html) |
| MaixPy 视频和教程 💿 | [B站搜 MaixCAM 或 MaixPy](https://search.bilibili.com/all?keyword=maixcam&from_source=webtop_search&spm_id_from=333.1007&search_source=5) |
| MaixHub 应用商店 📦 | [maixhub.com/app](https://maixhub.com/app) |
| MaixHub 分享广场 🎲 | [maixhub.com/share](https://maixhub.com/share) |

</div>
<div style="font-size: 1.2em;padding:1em; text-align:center; color: white">
<div style="padding: 1em 0 0 0">
<a target="_blank" style="color: white; font-size: 0.9em; border-radius: 0.3em; padding: 0.5em; background-color: #c33d45" href="https://item.taobao.com/item.htm?id=784724795837">淘宝</a>
<a target="_blank" style="color: white; font-size: 0.9em; border-radius: 0.3em; padding: 0.5em; background-color: #c33d45" href="https://www.aliexpress.com/store/911876460">速卖通</a>
</div>
</div>
<br>

Expand Down Expand Up @@ -68,6 +66,9 @@ title: MaixCAM MaixPy 快速开始

>! 注意,目前只支持 MaixCAM 开发板,其它同型号芯片的开发板均不支持,包括 Sipeed 的同型号芯片开发板,请注意不要买错造成不必要的时间和金钱浪费。

## 使用无屏幕版本

如果你使用的是无屏幕版本,请看[快速开始(无屏幕版本)](./README_no_screen.md)文档。


Expand Down Expand Up @@ -149,10 +150,10 @@ Classifier Result video
.. details::方法二在不同电脑系统中驱动安装方法:
:open: true
默认会有两种 USB 虚拟网卡驱动(NCM 和 RNDIS驱动),以满足不同系统的需求,你也可以在设备端`设置`应用 -> `USB设置` 里面关掉不用的虚拟网卡:
* **Windows**: windows 所有系统会自动安装 RNDIS 驱动, 仅 Win11 会自动安装 NCM 驱动,两种驱动有一个能用就行
* **Windows**: windows 所有系统会自动安装 RNDIS 驱动, 仅 Win11 会自动安装 NCM 驱动,两种驱动**有一个能用就行**
* 打开任务管理器 -> 性能,可以看到一个虚拟的以太网,并且可以看到 ip 比如 `10.131.167.100` 是电脑的 ip, 设备的 ip 是最后一位改为`1``10.131.167.1`。如果是 Win11 则会看到两个虚拟网卡,随便选择一个 IP 使用即可。
* 另外也可以打开电脑的 `设备管理器`(搜索栏搜索`设备管理器`), RNDIS 和 NCM 驱动被正确安装的效果:
![RNDIS ok](../../static/image/rndis_windows.jpg) ![NCM ok](../../static/image/windows_ncm_ok.png)
![RNDIS ok](../../static/image/windows_rndis_ok.png) ![NCM ok](../../static/image/windows_ncm_ok.png)
* **Linux**: 无需额外设置,插上 USB 线即可。 使用 `ifconfig` 或者 `ip addr` 查看到 `usb0``usb1` 网卡,两个 IP 都可以使用,**注意** 这里看到的 ip 比如 `10.131.167.100` 是电脑的 ip, 设备的 ip 是最后一位改为`1``10.131.167.1`
* **MacOS**: 在`系统设置`->`网络`里面查看到 `usb` 网卡,**注意** 这里看到的 ip 比如 `10.131.167.100` 是电脑的 ip, 设备的 ip 是最后一位改为`1``10.131.167.1`

Expand Down
2 changes: 1 addition & 1 deletion docs/doc/zh/peripheral/adc.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ print(f"ADC vol:{vol}")

MaixCAM 引出一个连接 ADC 的 IO,为 GPIO B3,如下图所示:

![](http://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)
![](https://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)

该 IO 默认为 ADC, 无需额外进行配置。

Expand Down
2 changes: 1 addition & 1 deletion docs/doc/zh/peripheral/gpio.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ title: MaixCAM MaixPy 使用 GPIO
首先我们需要知道设备有哪些引脚和 GPIO,对于 MaixCAM 每个引脚都对应了一个 GPIO 控制器,如图:

![](http://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)
![](https://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)

需要注意的是,引脚除了作为 GPIO 使用,还能用作其它功能比如 PWM 使用,使用前我们需要设置一下引脚的功能为 GPIO。

Expand Down
2 changes: 1 addition & 1 deletion docs/doc/zh/peripheral/i2c.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ title: MaixCAM MaixPy 使用 I2C
`MaixCAM``I2C` 及对应的 引脚 看图:

![](http://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)
![](https://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)


对于 MaixCAM,由于引脚资源比较紧张,引出的 `I2C1` `I2C3` 引脚和 WiFi 模块(SDIO1)重合了,所以 WiFi 和硬件 I2C 只能二选一使用。
Expand Down
2 changes: 1 addition & 1 deletion docs/doc/zh/peripheral/pinmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ update:
## MaixPy 中使用Pinmap

对于 MaixCAM 板子上各个引脚的编号及其功能,可以参考下图:
![](http://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)
![](https://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)

或是阅读 [SG2002芯片手册](https://cn.dl.sipeed.com/fileList/LICHEE/LicheeRV_Nano/07_Datasheet/SG2002_Preliminary_Datasheet_V1.0-alpha_CN.pdf) Pinmux 章节了解剩余的引脚的编号及功能。

Expand Down
2 changes: 1 addition & 1 deletion docs/doc/zh/peripheral/pwm.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ title: MaixCAM MaixPy 使用 PWM

以及每个 `PWM` 有对应的引脚,根据 MaixCAM 的引脚图可以看到:

![](http://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)
![](https://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)

这里我们推荐使用`PWM6``PWM7`

Expand Down
2 changes: 1 addition & 1 deletion docs/doc/zh/peripheral/spi.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ SPI 是非常常见的通信接口,通过 SPI 接口,SoC 能控制各式各

MaixCAM 的引脚分布如下:

![](http://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)
![](https://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)

使用前需要 `maix.peripheral.pinmap` 完成对 SPI 的管脚映射。

Expand Down
2 changes: 1 addition & 1 deletion docs/doc/zh/peripheral/uart.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ while not app.need_exit():

每个引脚可能可以对应不同的外设功能,这也叫引脚复用,如下图,每个引脚对应了不同功能,比如`A17`引脚(板子的丝引标识)对应了`GPIOA17` `UART0_RX` `PWM5` 这三种功能,默认是`UART0_RX`

![](http://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)
![](https://wiki.sipeed.com/hardware/zh/lichee/assets/RV_Nano/intro/RV_Nano_3.jpg)


默认我们就能像上面直接使用`UART0`,对于其它串口的引脚默认都不是串口外设功能,所以要使用其它串口,需要先设置一下映射,使用`pinmap.set_pin_function`来设置。
Expand Down
Loading

0 comments on commit bc0d986

Please sign in to comment.