Skip to content

Commit

Permalink
update maixcam doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Neutree committed May 9, 2024
1 parent 3913512 commit 73d623e
Show file tree
Hide file tree
Showing 19 changed files with 148 additions and 72 deletions.
2 changes: 1 addition & 1 deletion config/config_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"items": [
{
"label": "Products",
"url": "/hardware/en/",
"url": "/en/",
"position": "left"
},
{
Expand Down
25 changes: 14 additions & 11 deletions docs/hardware/en/maixcam/assemble.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,27 @@
title: MaixCAM Case
---

**The screen protector and lens cover serve as protective measures during shipping. Please remove them before use.**
## Introduction

MaixCAM comes with a 3D-printed case that protects the hardware of the MaixCAM.
There are a few accessories to note when you receive your device:
* **Lens Cap**: Protects the lens during transport. Please remove it before use, otherwise, the image will appear black.
* **Screen Protector**: To prevent scratches during transport, there is a thin plastic film on the screen. Please remove it upon arrival, as it can severely affect the viewing quality.
* **Manual Focus Lens**: The lens supports manual focusing. Simply rotate the lens gently to adjust the focus. If the image is blurry, it may be due to incorrect focusing.
* **Case**: A 3D-printed case that facilitates handling and installation while enhancing aesthetics.

## Disassembly

It is strongly recommended to choose the package with a TF card. The factory default is already assembled, and you can skip this step and use it directly.
It is strongly recommended to choose the package that includes a TF card, as it comes pre-assembled from the factory and you can skip this step and use it directly.

The factory default is already assembled. If you need to replace the TF card or solder the pin header, you can try to disassemble it.
The device is pre-assembled from the factory, but if you need to replace the TF card or solder pin headers, you can attempt to disassemble it.

Here are a few points to note:
* Make sure to power off before disassembly.
* There is thermal grease (non-conductive) between the CPU and the case. Please be careful not to get your clothes dirty during disassembly.
* The heat sink is also in contact with the heat sink plate through thermal grease. Please be careful not to get your clothes dirty during disassembly.
* Be careful not to damage the camera, touch, and screen cables. Do not break the cables.
* Pay attention to the direction of the cable, do not plug it in the wrong way.
Here are some points to note:
* Ensure the device is powered off before disassembling.
* There is a thermal pad between the CPU and the case; be careful not to dislodge it during disassembly.
* Be careful not to damage the camera, touch, and screen ribbon cables (they can easily become loose), and do not break the cables.
* Pay attention to the orientation of the ribbon cables to avoid inserting them incorrectly.

### Replacing the TF Card
## Replacing the TF Card

1. **Open the Case:** Gently pry open the clasps on both sides of the device to separate the front and back covers.

Expand Down
54 changes: 33 additions & 21 deletions docs/hardware/en/maixcam/os.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,61 @@
---
---
title: MaixCAM System Flashing
---

## Download the System

Find the latest system image file, such as `maixcam_os_20240401_maixpy_v4.1.0.xz`, on the [MaixPy release page](https://github.com/sipeed/MaixPy/releases).
Find the latest system image file on the [MaixPy Release Page](https://github.com/sipeed/MaixPy/releases), such as `maixcam_os_20240401_maixpy_v4.1.0.xz`.

Alternative address:
Alternative download link:
* [Sourceforge](https://sourceforge.net/projects/maixpy/files/)

## Prepare Flashing Tools
## Prepare the Flashing Tool

Download [Etcher](https://etcher.balena.io/), install and open it.

Windows can also use [Win32DiskImager](https://sourceforge.net/projects/win32diskimager/) or [Rufus](https://rufus.ie/).
Windows users can also use [Win32DiskImager](https://sourceforge.net/projects/win32diskimager/) or [Rufus](https://rufus.ie/).

## Flash TF Card
## Flashing the TF Card

There are two ways to flash the TF card:
* If you bought the official TF card package, it already contains a system, but the version might be outdated. It is recommended to use the USB update method so you don't have to disassemble the casing, which makes it difficult to reassemble.
* If you are using your own card and have never flashed a system onto it before, you must first flash it using a card reader and then install the TF card by disassembling the device. After that, you can flash the image directly via USB without disassembling.

### Method One: Flashing the TF Card Using a Card Reader

* Remove the TF card and insert it into a card reader, then plug it into the computer.
* Open Etcher, select the image file, choose the TF card, and click `Flash`.
* Wait for the flashing process to complete, eject the TF card, insert it into the MaixCAM, power it up, and wait for the system to boot. The first boot may be slow, just wait for a while.

### Flash TF Card with Card Reader
### Method Two: Update the TF Card Image via USB

* Directly remove the TF card, insert it into the card reader, and then insert it into the computer.
* Open Etcher, select the image file, select the TF card, and click `Flash`.
* Wait for the flashing to complete, eject the TF card, insert it into MaixCAM, then power on, wait for the system to start, the first boot will be slower, just wait a while.
**Note: USB can only be used for updates, not for the first-time flashing.**
Ensure that the system has already been flashed using a card reader and is **running properly** before using this method.

### Flash TF Card via USB
* Power off the MaixCAM, keeping the TF card inserted.
* Hold down the `user` button, plug in the USB cable to the computer, (or plug in the USB cable first, then hold down the `user` button, press the `reset` button briefly and release it), wait for the disk drive to appear on the computer, and then release the `user` button.
* Open `Etcher`, select the image file, choose the disk drive, and click `Flash`.
* Wait for the flashing to complete, then press the `reset` button or power it back on, wait for the system to boot. The first boot might be slow, wait until the screen displays content (to be safe, wait about 1 minute), and do not power off during boot-up to prevent file corruption during system initialization (if this happens, reflash the image).

* Power off MaixCAM, keep the TF card inserted.
* Hold down the `user` button on the device without releasing it, insert the USB cable connected to the computer, and wait for the USB device to appear on the computer.
* Open Etcher, select the image file, select the USB device, and click `Flash`.
* Wait for the flashing to complete, then press the `reset` button or re-power on, wait for the system to start, the first boot will be slower, just wait a while.
> If you cannot enter USB upgrade mode, the system files may be corrupted, and you should reflash the TF card using a card reader.
## System Usage Precautions
## Points to Note When Using the System

### Forced Shutdown

It is **not recommended to press the `reset` button** during normal system use, except in the situations mentioned above. This button forces a power cut, and if your system is writing content to the TF card, it could cause system and data damage. Similarly, forcibly unplugging the power while the system is still running poses the same risk as pressing the `reset` button. Always try to **shut down the software before unplugging the power**.
Other than the above situations where using the `reset` button, it is **not recommended to press the `reset` button** during normal use. This button forcefully cuts off power. If your system is writing content to the TF card, it could cause system and data damage.
Similarly, forcibly unplugging the power supply while the system is still running poses the same risk. Try to **shut down the software before unplugging the power supply**.

For normal operations, please **shut down or restart using software**. Here are the methods:
For normal use, please **shut down or reboot via software**. Methods:
* Method One: From the interface, select `Settings` -> `Power` to perform a software shutdown or reboot.
* Method Two: In the terminal, use the `poweroff` or `reboot` commands to shut down or restart via software.
* Method Three: Other software calls, such as using `Python` to invoke `import os;os.system("poweroff")` for shutdown or reboot.

- **Method 1:** Navigate to `Settings` -> `Power` to shut down or restart through the software.
- **Method 2:** Use the `poweroff` or `reboot` commands in the terminal for software shutdown or restart.
- **Method 3:** Other software calls, such as using Python `import os; os.system("poweroff")` to shut down or restart.
### Issues with File Writing and Data Loss

The system uses a caching mechanism. When your code writes a file, it might only write to memory initially, and the system automatically writes to the disk after some time. If the power is cut during this period, the content will not be written to the disk (TF card), and the next time the system boots, the previously written content will be missing.

Solutions:
* Try not to directly cut off power or press the `reset` button; use the software shutdown methods mentioned above.
* To save critical content, you can manually call an API to force the content to be written to disk. For example, in `Python`, you can use `os.sync()` to tell the system to immediately write all cached files to the disk. For other methods such as writing to a specific file, and other languages, please search for terms

10 changes: 7 additions & 3 deletions docs/hardware/zh/maixcam/assemble.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
title: MaixCAM 外壳
---

**屏幕保护膜及镜头透明盖在运输中起保护作用,使用时撕掉、取下即可。**
## 简介

MaixCAM 自带了一个 3D 打印外壳,可以保护 MaixCAM 的硬件。
拿到手有几个配件需要注意:
* **镜头盖**: 运输过程中保护镜头,使用时请取下,不让画面会是黑的。
* **屏幕保护膜**:为了防止运输刮花屏幕,有一个塑料薄膜,到手请直接撕掉,不然会严重影响观感。
* **镜头手动对焦**: 镜头支持手动对焦,轻轻旋动镜头即可实现手动对焦,如果画面模糊则可能对焦不正确。
* **外壳**:一个 3D 打印外壳,方便握持和安装,同时增加美观性。

## 拆机

Expand All @@ -15,7 +19,7 @@ MaixCAM 自带了一个 3D 打印外壳,可以保护 MaixCAM 的硬件。
这里有几点需要注意:
* 拆机前请确保已经断电。
* CPU和外壳之间有导热垫,拆机时请注意不要搞掉。
* 注意不要破坏摄像头、触摸、屏幕的排线,不要折断排线。
* 注意不要破坏摄像头、触摸、屏幕的排线(比较容易松动),不要折断排线。
* 注意排线的方向,不要插反。


Expand Down
21 changes: 17 additions & 4 deletions docs/hardware/zh/maixcam/os.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,26 @@ Windows 也可以用 [Win32DiskImager](https://sourceforge.net/projects/win32dis
## 烧录 TF 卡

有两种方式烧录 TF 卡:
* 如果你买的官方的 TF 卡套餐,里面已经有系统了,只是版本可能比较老旧,建议使用 USB 更新系统的方法,这样就不用拆外壳了,拆外壳会比较难装。
* 如果你使用自己的卡, 且从来没有烧录过系统,那么必须至少要先用 读卡器烧录一次,然后拆机安装 TF 卡,后面就不用拆机直接使用 USB 烧录镜像了。

### 读卡器烧录 TF 卡
### 方法一: 读卡器烧录 TF 卡

* 直接取出 TF 卡,插入读卡器,然后插入电脑。
* 打开 Etcher,选择镜像文件,选择 TF 卡,点击`Flash`
* 等待烧录完成,弹出 TF 卡,插入 MaixCAM,然后上电,等待系统启动,第一次启动会慢一点,等待一会即可。

### USB 更新 TF 卡镜像
### 方法二: USB 更新 TF 卡镜像

**注意使用 USB 只能更新系统不能用作第一次烧录。**
请保证 TF 里面已经用 读卡器烧录过系统,并且**系统能正常运行**之后才能用这种方式。

* MaixCAM 断电,保持 TF 卡插入。
* 按住设备的 `user` 按键不松开,插入 USB 线连接到电脑,(或者先插入 USB 线,然后按住 `usr`按键不放,再按一下`reset`按钮立即松开)等待 U 盘设备出现在电脑上。
* 按住设备的 `user` 按键不松开,插入 USB 线连接到电脑,(或者先插入 USB 线,然后按住 `user`按键不放,再按一下`reset`按钮立即松开`reset`)等待 U 盘设备出现在电脑上,然后再松开`user`按键
* 打开 `Etcher`,选择镜像文件,选择 U 盘设备,点击`Flash`
* 等待烧录完成,然后按一下 `reset` 按键或者重新上电,等待系统启动,第一次启动会慢一点,等待一会即可。
* 等待烧录完成,然后按一下 `reset` 按键或者重新上电,等待系统启动,第一次启动会慢一点,等待一会即可(等待屏幕显示内容,保险起见等待1分钟左右),启动过程中不要断电,防止正在开机处理的文件损坏(解决方法是重新烧录镜像)

> 如果发现进不了 U 盘升级模式,可能是系统文件损坏,使用读卡器烧录 TF 卡即可。

## 使用系统注意点
Expand All @@ -51,6 +55,15 @@ Windows 也可以用 [Win32DiskImager](https://sourceforge.net/projects/win32dis
* 方法三:其它软件调用,比如 `Python` 调用 `import os;os.system("poweroff")` 进行关机或者重启。


### 文件写入和内容丢失问题

系统做了缓存机制,当你的代码在写入文件时,可能只是写入到了内存,过一段时间后系统自动写入到磁盘,如果在这中间断电了,那么内容就没有写入到磁盘(TF卡),下次开机就会发现之前写入的内容不存在。

解决方法:
* 尽量不直接断电或者按`reset`按键,使用上面说的软关机。
* 保存重要的内容,可以手动调用强制写入内容到磁盘的 API,比如在 `Python` 里面可以用`os.sync()`来告诉系统把所有缓存的文件立即写入到磁盘,其它的方式比如写入指定文件,以及其它语言请自性搜索类似`Linux 刷新内容到磁盘`的关键词。





42 changes: 35 additions & 7 deletions docs/soft/maixpy/en/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,37 @@
---
title: Introduction of MaixPy
title: Introduction of MaixPy-v1
keywords: maixpy, k210, AIOT, edge computing
desc: maixpy Introduction to MaixPy documentation
desc: maixpy Introduction to MaixPy-v1 documentation
---

<div style="font-size: 1.2em;border: 2px solid green; border-color:#c33d45;padding:1em; text-align:center; background: #c33d45; color: white">
<div>
<span>The new version of MaixPy (v4) is now live, with full Python3 support, and more powerful features, see:</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>New hardware product MaixCAM, major performance upgrade, see:</span>
<a target="_blank" style="color: #ffe0e0" href="https://wiki.sipeed.com/maixcam">
https://wiki.sipeed.com/maixcam
</a>
</div>
<div style="padding: 1em 0 0 0">
<a 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 style="color: white; font-size: 0.9em; border-radius: 0.3em; padding: 0.5em; background-color: #a80202" href="https://www.aliexpress.us/item/1005006912917562.html">AliExpress</a>
</div>
</div>

**The Maix-I K210 series is being phased out; if you are planning to purchase a K210, please choose the MaixCAM immediately;**
**K210 users are also encouraged to upgrade to MaixCAM**

**In this document (under the path https://wiki.sipeed.com/soft/maixpy/en/), all references to MaixPy specifically refer to MaixPy-v1.**

<br>
<br>


<div class="title_pic">
<div class="logo_maixpy">
<img src="../assets/maixpy/maixpy.png" alt="maixpy ​​logo">
Expand All @@ -26,7 +54,7 @@ desc: maixpy Introduction to MaixPy documentation
</thead>
<tbody>
<tr>
<td><strong>MaixPy</strong> official document website</td>
<td><strong>MaixPy-v1</strong> official document website</td>
<td><span class="limit_width">Official website:</span> <span class=""><a
href="https://wiki.sipeed.com/soft/maixpy/en/"
rel="nofollow"><strong>wiki.sipeed.com</strong></a></span><br><span class="limit_width">Chinese
Expand All @@ -38,17 +66,17 @@ desc: maixpy Introduction to MaixPy documentation
</td>
</tr>
<tr>
<td><strong>MaixPy</strong> demo repository</td>
<td><strong>MaixPy-v1</strong> demo repository</td>
<td><span class="limit_width">github:</span> <span class=""><a
href="https://github.com/sipeed/MaixPy-v1_scripts"><strong>github/maixpy_script
</strong></a></span> <br><span class="limit_width">Domestic:</span><span class=""><a
href="https://gitee.com/Sipeed/maixpy_scripts "
rel="nofollow"><strong>gitee/maixpy_scripts</strong></a></span></td>
</tr>
<tr>
<td>MaixPy source code</td>
<td>MaixPy-v1 source code</td>
<td><span class="limit_width"></span><span class=""><a
href="https://github.com/sipeed/MaixPy"><strong>github: MaixPy</strong> </a></span></td>
href="https://github.com/sipeed/MaixPy-v1"><strong>github: MaixPy-v1</strong> </a></span></td>
</tr>
<tr>
<td>Hardware data download</td>
Expand All @@ -63,7 +91,7 @@ desc: maixpy Introduction to MaixPy documentation
</tbody>
</table>

## About MaixPy
## About MaixPy-v1

[**MaixPy**](https://maixpy.sipeed.com/zh/wiki.sipeed.com/maixpy) is to port [Micropython](http://micropython.org/) to [K210](https://canaan-creative.com/product/kendryteai) (a 64-bit dual-core RISC-V CPU with hardware FPU, convolution accelerator, FFT, Sha256) is a project that supports the normal operation of the MCU and integrates hardware acceleration. `AI` machine vision and microphone array, `1TOPS` computing power core module is less than `¥50`, in order to quickly develop intelligent applications in the field of `AIOT` with extremely low cost and practical size.

Expand Down
4 changes: 2 additions & 2 deletions docs/soft/maixpy/en/api_reference/Maix/kpu.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ The `offset` and `file_path` parameters can only choose one of the two, no keywo

##### Return

If it is loaded correctly, the return value will be returned, otherwise an error will be thrown. Please see the error message thrown. In addition, please refer to [here](https://github.com/sipeed/MaixPy-v1blob/fa3cf2c96353fa698e9386e42be8b3c9cf495114/components/kendryte_sdk/include/sipeed_kpu.h#L6-L23)
If it is loaded correctly, the return value will be returned, otherwise an error will be thrown. Please see the error message thrown. In addition, please refer to [here](https://github.com/sipeed/MaixPy-v1/blob/fa3cf2c96353fa698e9386e42be8b3c9cf495114/components/kendryte_sdk/include/sipeed_kpu.h#L6-L23)

If the error code is found to be less than the value of `2000`, the firmware version is too low, and the firmware version needs to be updated

Expand Down Expand Up @@ -319,7 +319,7 @@ After `load`, you need to call this function to manually set the output layer sh

##### Return

* `success`: Whether the setting is successful, if not, please pay attention to the output prompt information, refer to [error code](https://github.com/sipeed/MaixPy-v1blob/fa3cf2c96353fa698e9386e42be8b3c9cf495114/components/kendryte_sdk/include/sipeed_kpu.h#L6-L23)
* `success`: Whether the setting is successful, if not, please pay attention to the output prompt information, refer to [error code](https://github.com/sipeed/MaixPy-v1/blob/fa3cf2c96353fa698e9386e42be8b3c9cf495114/components/kendryte_sdk/include/sipeed_kpu.h#L6-L23)


### memtest
Expand Down
Loading

0 comments on commit 73d623e

Please sign in to comment.