You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/doc/en/basic/maixvision.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,7 @@ When we click the 'pause' button in the top right corner, it will stop sending i
39
39
## Code Auto Completion
40
40
41
41
Code suggestions depend on local Python packages installed on your computer. To enable code suggestions, you need to install Python on your computer and the required Python packages.
42
+
> If it is not installed, a red underlined wavy line error prompt will be displayed. The code can still run normally, but there will be no code completion prompt.
42
43
43
44
* To install Python, visit the [Python official website](https://python.org/).
44
45
* To install the required packages, for MaixPy, for instance, you need to install the MaixPy package on your computer using `pip install MaixPy`. If `MaixPy` gets updated, you should update it on both your computer and device. On your computer, manually execute `pip install MaixPy -U` in the terminal. For device updates, update directly in the `Settings` application.
@@ -52,6 +53,27 @@ Code suggestions depend on local Python packages installed on your computer. To
52
53
> Additionally, while you have the MaixPy package installed on your computer, due to our limited resources, we cannot guarantee that you can directly use the Maix package in your computer's Python. Please run it on supported devices.
53
54
54
55
56
+
In addition, in addition to the MaixPy package, other code hints, such as `numpy/opencv`, also need to be installed on the computer to implement code hints.
57
+
58
+
## Single file and project (multiple py file projects/modularization)
59
+
60
+
When writing code, there are generally two modes, executing a single file, or executing a complete project (containing multiple py files or other resource files).
61
+
***Single file mode**: MaixVision creates or opens a file in the `.py` format, and clicks Run in the lower left corner after editing to execute the code.
62
+
***Project (multiple files) mode**:
63
+
* Create an empty folder in the system file manager, and MaixVision clicks `Open folder/project` to open this empty folder.
64
+
* Create a main program entry of `main.py` (the name must be `main.py`). If `main.py` wants to reference other `.py` files, create a `.py` file in the project folder, such as `a.py`
65
+
```python
66
+
defsay_hello():
67
+
print("hello from module a")
68
+
```
69
+
* Reference in `main.py`
70
+
```python
71
+
from a import say_hello
72
+
say_hello()
73
+
```
74
+
* Run the project, click the `Run Project` button in the lower left corner to automatically package the entire project and send it to the device for running.
75
+
* If you have opened a folder/project and still want to run a file separately, you can open the file you want to run, and then click the `Run Current File` in the lower left corner to send only the current file to the device for running. Note that other files will not be sent to the device, so do not reference other `.py` files.
Copy file name to clipboardExpand all lines: docs/doc/en/faq.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -130,6 +130,9 @@ Here, the `model` is specified as the `yolov5s_224_int8.cvimodel` file relative
130
130
131
131
This error occurs because MaixVision's code hinting feature cannot find the `maix` module. It's important to understand that MaixVision's code hinting relies on the local Python packages on your computer, while the code execution depends on the Python packages on the device. To enable MaixVision's code hinting, you need to install Python and the `MaixPy` package on your computer. For more details, refer to the [MaixVision User Documentation](./basic/maixvision.md).
132
132
133
+
## MaixVision how to import from another .py file
134
+
135
+
Read documentation of [MaixVision](./basic/maixvision.md) carefully.
133
136
134
137
## MaixCAM starts very slowly, even exceeding 1 minute, or the screen flickers
多半是由于供电不足造成的, MaixCAM 需要 5v 150mA~500mA 左右的电压和点流,如果你遇到了这种现象,可以使用 USB 转 TTL 模块连接 MaixCAM 的串口到电脑,可以看到`Card did not respond to voltage select! : -110` 这样的字样,说明供电不足,换一个更加的稳定的供电设备即可。
0 commit comments