Skip to content

Commit 3e898ea

Browse files
committed
* update maixcam2 docs
1 parent ee3133e commit 3e898ea

File tree

18 files changed

+751
-381
lines changed

18 files changed

+751
-381
lines changed

docs/doc/en/README.md

Lines changed: 27 additions & 148 deletions
Large diffs are not rendered by default.

docs/doc/en/README_MaixCAM.md

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
---
2+
title: MaixCAM MaixPy Quick Start
3+
---
4+
5+
<style>
6+
#head_links table {
7+
width: 100%;
8+
display: table;
9+
}
10+
11+
@media screen and (max-width: 900px){
12+
#head_links th, #head_links td {
13+
/* padding: 8px; */
14+
font-size: 0.9em;
15+
padding: 0.1em 0.05em;
16+
}
17+
}
18+
</style>
19+
20+
## Getting Started
21+
22+
### Prepare the TF Image Card and Insert it into the Device
23+
24+
If the package you purchased includes a TF card, it already contains the factory image. If the TF card was not installed in the device at the factory, you will first need to carefully open the case (be careful not to tear the ribbon cables inside) and then insert the TF card. Additionally, since the firmware from the factory may be outdated, it is highly recommended to follow the instructions on [Upgrading and Flashing the System](./basic/os.md) to upgrade the system to the latest version.
25+
26+
If you did not purchase a TF card, you need to flash the system onto a self-provided TF card. Please refer to [Upgrading and Flashing the System](./basic/os.md) for the flashing method, and then install it on the board.
27+
28+
### Power On
29+
30+
Use a `Type-C` data cable to connect the `MaixCAM` device and power it on. Wait for the device to boot up and enter the function selection interface.
31+
32+
![maixcam_font](../../static/image/maixcam_font.png)
33+
34+
If the screen does not display:
35+
* Please confirm that you purchased the bundled TF card. If you confirm that you have a TF card and it is inserted into the device, you can try <a href="./basic/os" target="_blank">updating to the latest system</a>.
36+
* If you did not purchase the TF card bundle, you need to follow the instructions in <a href="./basic/os" target="_blank">updating to the latest system</a> to flash the latest system onto the TF card.
37+
* Also, ensure that the screen and camera cables are not loose. The screen cable can easily come off when opening the case, so be careful.
38+
39+
### Connect to the Network
40+
41+
For the first run, you need to connect to the network, as you will need it later to activate the device and use the IDE.
42+
If you don't have a router, you can use your phone to open a hotspot.
43+
44+
Click `Settings` on the device and select `WiFi`. There are two ways to connect to the `WiFi` hotspot:
45+
46+
* Scan the WiFi sharing code:
47+
* Use your phone to share the `WiFi` hotspot QR code, or go to [maixhub.com/wifi](https://maixhub.com/wifi) to generate a QR code.
48+
* Click the `Scan QR code` button, the camera screen will appear, scan the QR code generated previously to connect.
49+
* Search for hotspots:
50+
* Click the `Scan` button to start scanning the surrounding `WiFi`, you can click multiple times to refresh the list.
51+
* Find your WiFi hotspot.
52+
* Enter the password and click the `Connect` button to connect.
53+
Then wait for the `IP` address to be obtained, which may take `10` to `30` seconds. If the interface does not refresh, you can exit the `WiFi` function and re-enter to view it, or you can also see the `IP` information in `Settings` -> `Device Information`.
54+
55+
### Update the Runtime Libraries
56+
57+
**This step is very important!!!** If this step is not done properly, other applications and functions may not work (e.g., they may crash).
58+
59+
* First, ensure that you have completed the previous step of connecting to WiFi and have obtained an IP address to access the internet.
60+
* On the device, click `Settings`, and select `Install Runtime Libraries`.
61+
* After the installation is complete, you will see that it has been updated to the latest version. Then exit.
62+
63+
If it shows `Request failed` or `请求失败` (Request failed), please first check if the network is connected. You need to be able to connect to the internet. If it still doesn't work, please take a photo and contact customer service for assistance.
64+
65+
### Use Built-in Applications
66+
67+
Many applications are built-in, such as Find Blobs, AI Detector, Line Follower, etc. For example, Find Blobs:
68+
69+
<video playsinline controls autoplay loop muted preload class="pl-6 pb-4 self-end" src="/static/video/self_learn_tracker.mp4" type="video/mp4" style="width:100%">
70+
Classifier Result video
71+
</video>
72+
73+
Please explore other applications on your own. More applications will be updated in the future. For usage documentation and application updates, please see the [MaixHub App Store](https://maixhub.com/app).
74+
75+
**Note: The applications only include a part of the functionality that MaixPy can achieve. Using MaixPy, you can create even more features.**
76+
77+
## Use as a Serial Module
78+
79+
> If you want to use the device as the main controller (or if you don't understand what a serial module is), you can skip this step.
80+
81+
The built-in applications can be used directly as serial modules, such as `Find Blobs`, `Find Faces`, `Find QR Codes`, etc.
82+
Note that the serial port can only directly connect to other microcontrollers. **If you want to communicate with a computer via a serial port, you must provide a USB-to-serial module yourself.**
83+
84+
Usage:
85+
* Hardware connection: You can connect the device to the `Type-C one-to-two mini board`(For MaixCAM-Pro is 6Pin interface), which allows you to connect the device via serial to your main controller, such as `Arduino`, `Raspberry Pi`, `STM32`, etc.
86+
* Open the application you want to use, such as QR code recognition. When the device scans a QR code, it will send the result to your main controller via serial.
87+
> The serial baud rate is `115200`, the data format is `8N1`, and the protocol follows the [Maix Serial Communication Protocol Standard](https://github.com/sipeed/MaixCDK/blob/master/docs/doc/convention/protocol.md). You can find the corresponding application introduction on the [MaixHub APP](https://maixhub.com/app) to view the protocol.
88+
> If APP no serial output, you can also do it by yourself, follow function examples and [UART usage doc](./peripheral/uart.md) to add function and serial output.
89+
90+
## Preparing to Connect Computer and Device
91+
92+
To enable communication between the computer (PC) and the device (MaixCAM), we need to ensure they are on the same local area network. There are two methods to achieve this:
93+
94+
* **Method 1 (Highly Recommended)**: Wireless Connection. Connect the device to the same router or Wi-Fi hotspot that the computer is connected to via Wi-Fi. Go to the device's `Settings -> WiFi Settings` and connect to your Wi-Fi. (If you experience **screen lag or high latency** with Wi-Fi, you can try Method 2 for a wired connection.)
95+
96+
Here is the translation:
97+
98+
* **Method Two**: Wired Connection. The device connects to the computer via a USB cable, and the device will emulate as a USB network adapter. This way, the device and the computer will be on the same local network through the USB connection. It is recommended to start with WiFi because although a wired connection offers stable transmission, it may encounter issues such as faulty cables, poor connection, or driver problems. If you encounter any issues, you can refer to the common problems in the [FAQ](./faq.md).
99+
100+
.. details::Method Two: Driver Installation on Different Computer Systems:
101+
:open: true
102+
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`:
103+
* **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.
104+
* 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.
105+
* 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:
106+
![RNDIS ok](../../static/image/windows_rndis_ok.png) ![NCM ok](../../static/image/windows_ncm_ok.png)
107+
* **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`.
108+
* **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`.
109+
110+
## Preparing the Development Environment
111+
112+
* First, ensure that the computer and the device are on the same local network as per the previous step.
113+
* Download and install [MaixVision](https://wiki.sipeed.com/maixvision).
114+
* Connect the device and the computer using a Type-C cable. Open MaixVision, click the `“Connect”` button in the lower left corner, and it will automatically search for the device. Wait for a moment until the device appears, then click the connection button next to the device to connect.
115+
116+
If **no device is detected**, you can also manually enter the device's IP address in the **device**'s `Settings -> Device Info`. You can also find solutions in the [FAQ](./faq.md).
117+
118+
**After a successful connection, the function selection interface on the device will disappear, and the screen will turn black, releasing all hardware resources. If there is still an image displayed, you can disconnect and reconnect.**
119+
120+
Here is a video example of using MaixVision:
121+
122+
<video style="width:100%" controls muted preload src="/static/video/maixvision.mp4"></video>
123+
124+
## Run Examples
125+
126+
Click `Example Code` on the left side of MaixVision, select an example, and click the `Run` button in the bottom left to send the code to the device for execution.
127+
128+
For example:
129+
* `hello_maix.py`: Click the `Run` button, and you will see messages printed from the device in the MaixVision terminal, as well as an image in the upper right corner.
130+
* `camera_display.py`: This example will open the camera and display the camera view on the screen.
131+
```python
132+
from maix import camera, display, app
133+
134+
disp = display.Display() # Construct a display object and initialize the screen
135+
cam = camera.Camera(640, 480) # Construct a camera object, manually set the resolution to 640x480, and initialize the camera
136+
while not app.need_exit(): # Keep looping until the program exits (you can exit by pressing the function key on the device or clicking the stop button in MaixVision)
137+
img = cam.read() # Read the camera view and save it to the variable img, you can print(img) to print the details of img
138+
disp.show(img) # Display img on the screen
139+
```
140+
* `yolov5.py` will detect objects in the camera view, draw bounding boxes around them, and display them on the screen. It supports detection of 80 object types. For more details, please see [YOLOv5 Object Detection](./vision/yolov5.md).
141+
142+
You can try other examples on your own.
143+
144+
> If you encounter image display stuttering when using the camera examples, it may be due to poor network connectivity, or the quality of the USB cable or the host's USB being too poor. You can try changing the connection method or replacing the cable, host USB port, or computer.
145+
146+
## Install Applications on the Device
147+
148+
The above examples run code on the device, but the code will stop running when `MaixVision` is disconnected. If you want the code to appear in the boot menu, you can package it as an application and install it on the device.
149+
150+
Click the `Install App` button in the bottom left corner of `MaixVision`, fill in the application information, and the application will be installed on the device. Then you will be able to see the application on the device.
151+
You can also choose to package the application and share your application to the [MaixHub App Store](https://maixhub.com/app).
152+
153+
> The default examples do not explicitly write an exit function, so you can exit the application by pressing the function key on the device. (For MaixCAM, it is the user key.)
154+
155+
If you want the program to start automatically on boot, you can set it in `Settings -> Boot Startup`.
156+
157+
More MaixVision usage refer to [MaixVision documentation](./basic/maixvision.md)

0 commit comments

Comments
 (0)