Skip to content

Commit be4223f

Browse files
authored
Merge pull request #137 from SummerGGift/723
[WIP]【更新】插件 readme 使用网络图库
2 parents 749d16c + 919a672 commit be4223f

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

docs/MicroPythonPlug-in/README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# VSCode 最好用的 MicroPython 插件
22

3-
## 介绍 ([English](#Introduction))
3+
## 介绍 ([Drop down to view the English introduction document](#Introduction))
44

55
VSCode 最好用的 MicroPython 插件,为 MicroPython 开发提供了强大的开发环境,主要特性如下:
66

@@ -37,15 +37,15 @@ VSCode 最好用的 MicroPython 插件,为 MicroPython 开发提供了强大
3737

3838
1. 在 windows 操作系统下使用插件需要将 vscode 的默认终端修改为 powershell,如下图所示:
3939

40-
![select_powershell](assets/select_powershell.gif)
40+
![01_select_powershell](https://www.rt-thread.org/qa/data/attachment/forum/201910/22/095612g1fkz5fkr7fff177.gif)
4141

4242
如果想要使用 MicroPython 自动补全功能(如果暂时不需要自动补全功能,可以跳过后续步骤),还需要进行如下操作:
4343

4444
2. 安装 Python 插件
4545

4646
3. 按照 Python 插件的提示在 PC 上安装 Python3 并加入到系统环境变量中
4747

48-
![Python plug](assets/install_python_plug.png)
48+
![02_Python plug](https://www.rt-thread.org/qa/data/attachment/forum/201910/22/095612sku6jdblbtu3jpb6.png)
4949

5050
如果在 PC 上已经安装过上述插件和程序,可以跳过此准备步骤。
5151

@@ -65,43 +65,43 @@ MicroPython 开发的第一步是创建 MicroPython 工程,后续所有操作
6565

6666
#### 创建一个空白 MicroPython 工程
6767

68-
![create_blank_dir](assets/create_blank_prj.gif)
68+
![03_create_blank_dir](https://www.rt-thread.org/qa/data/attachment/forum/201910/22/095613f5oshzvj2og32gio.gif)
6969

7070
#### 创建一个基于 Demo 的 MicroPython 工程
7171

7272
通过该功能可以创建一个基于 demo 的 MicroPython 工程,开发者可以直接运行该 Demo 工程或者在该 Demo 的基础上实现自己想要的功能。
7373

74-
![create_demo_dir](assets/create_demo_prj.gif)
74+
![04_create_demo_dir](https://www.rt-thread.org/qa/data/attachment/forum/201910/22/095613zsspdy1cywjiyhcb.gif)
7575

7676
#### Weather Show Demo 在开发板上的运行效果
7777

78-
![demo_express](assets/demo_express.png)
78+
![05_demo_express](https://www.rt-thread.org/qa/data/attachment/forum/201910/22/095613vjarrl8nflyfzoya.png)
7979

8080
该 Demo 全部代码使用 MicroPython 编写,可以在 [潘多拉 IoT Board 开发板](https://item.taobao.com/item.htm?spm=a1z10.5-c-s.w4002-18400369818.12.2ba47ea5PzJxZx&id=583843059625)[正点原子 W601 WIFI 物联网开发板](https://item.taobao.com/item.htm?spm=a230r.1.14.13.7c5b4a9bS2LYUD&id=602233847745&ns=1&abbucket=17#detail) 上直接下载运行。
8181

8282
### 连接开发板
8383

8484
点击左下角的连接按钮,然后在弹出的设备列表中选择想要连接的设备,即可连接 MicroPython 开发板。
8585

86-
![uart_connect](assets/uart_connect.gif)
86+
![06_uart_connect](https://www.rt-thread.org/qa/data/attachment/forum/201910/22/095613vpb82unp0n9m8lf2.gif)
8787

8888
### 查看示例代码文件
8989

9090
MicroPython 插件提供丰富的示例代码,可在左侧活动栏中查看示例代码和库文件。右键点击示例文件,在下拉菜单中可以将示例文件添加到工程中。
9191

92-
![example_code](assets/check_example.png)
92+
![07_check_example](https://www.rt-thread.org/qa/data/attachment/forum/201910/22/095613szp10s0ouaulrxpq.png)
9393

9494
### 直接在开发板上运行 MicroPython 文件(调试神器)
9595

9696
该功能用于快速调试单个文件,频繁应用在调试代码的过程中。当我们在一个单独的文件中编写测试程序时,使用该功能可以将当前 python 文件下载到开发板的内存中运行,达到快速调试的效果,还可以使用快捷键 `alt + q` 来触发该功能。
9797

98-
![run_example](assets/direct_run_files.gif)
98+
![08_direct_run_files](https://www.rt-thread.org/qa/data/attachment/forum/201910/22/095614s0rbxgxrle0bjjix.gif)
9999

100100
### 在开发板上运行 MicroPython 代码片段
101101

102102
如果只是想进行代码量不大的代码调试,而不想将文件下载到开发板上,那么可以使用 **代码片段** 功能。在编辑器中选中想要运行的代码片段,然后在右键下拉菜单中选择 `在设备上执行选中的 MicroPython 代码` 选项,即可在 REPL 环境中运行所选代码。
103103

104-
![run_code_snippet](assets/run_code_snippet.gif)
104+
![09_run_code_snippet](https://www.rt-thread.org/qa/data/attachment/forum/201910/22/095614buewlgkp2mml2wca.gif)
105105

106106
### 下载文件/文件夹到开发板
107107

@@ -114,21 +114,21 @@ MicroPython 插件提供丰富的示例代码,可在左侧活动栏中查看
114114
| 删除文件 | `os.remove("file_to_del")` |
115115
| 删除文件夹 | `os.rmdir("dir_to_del")` |
116116

117-
![run_code_snippet](assets/download_file_floder.gif)
117+
![10_download_file_floder](https://www.rt-thread.org/qa/data/attachment/forum/201910/22/095614nbjb8bqzz48f8tl6.gif)
118118

119119
### 工程同步功能
120120

121121
点击左下角的同步按钮可以启动工程同步功能。通过该功能可将本地工程中所有目录文件,同步到开发板的文件系统中。该功能推荐在代码调试完成后使用,在调试过程中不必频繁同步工程。
122122

123123
工程同步完成后,可以在 `DEVICE FILES LIST` 栏目中看到 **设备中的文件列表**
124124

125-
![run_code_snippet](assets/sync_files.gif)
125+
![11_sync_files](https://www.rt-thread.org/qa/data/attachment/forum/201910/22/095614jaitcbhh1ge30h1e.gif)
126126

127127
### 基于 MicroPython 的代码智能补全
128128

129129
本插件支持基于 MicroPython 语法的代码智能补全和语法检查,这一强大功能对于开发 MicroPython 代码十分实用。它可以让开发者在编写函数的同时查看 API 参数提示,同时它给出的醒目提示也让开发者更易于查找代码中的错误。
130130

131-
![auto_complete](assets/auto_complete.gif)
131+
![12_auto_complete](https://i1.fuimg.com/702031/3145644b4275bce5.gif)
132132

133133
## 开发资源
134134

@@ -180,15 +180,15 @@ The firmware for the development boards numbered 1, 2, and 3 is provided by rt-t
180180

181181
1. Using plug-in under the Windows operating system requires changing the default terminal of vscode to powershell, as shown below:
182182

183-
![select_powershell](assets/en_select_powershell.gif)
183+
![select_powershell](https://raw.githubusercontent.com/RT-Thread-packages/micropython/master/docs/MicroPythonPlug-in/assets/en_select_powershell.gif)
184184

185185
If you want to use the MicroPython autocompletion feature (you can skip the next step if you don't need autocompletion for now), you need to do the following:
186186

187187
2. Install the Python plug-in
188188

189189
3. Install Python3 on your PC and add it to the system environment variables as instructed by the Python plug-in
190190

191-
![Python plug](assets/install_python_plug_en.png)
191+
![Python plug](https://raw.githubusercontent.com/RT-Thread-packages/micropython/master/docs/MicroPythonPlug-in/assets/install_python_plug_en.png)
192192

193193
If you already have the above plug-ins and programs installed on your PC, you can skip this preparation step.
194194

@@ -206,31 +206,31 @@ Note: the configuration change requires **to restart the operating system** for
206206

207207
The first step in MicroPython development is to create a MicroPython project within which all subsequent operations must run. There are two ways to create a new MicroPython project, a blank project and a demo-based project, which are shown below.
208208

209-
![create_blank_dir](assets/en_create_blank_project.gif)
209+
![create_blank_dir](https://raw.githubusercontent.com/RT-Thread-packages/micropython/master/docs/MicroPythonPlug-in/assets/en_create_blank_project.gif)
210210

211211
### Connecting development board
212212

213213
You can connect to the MicroPython development board by clicking the connection button in the lower left corner and then selecting the device you want to connect to in the pop-up list of devices.
214214

215-
![uart_connect](assets/en_connect_board.gif)
215+
![uart_connect](https://raw.githubusercontent.com/RT-Thread-packages/micropython/master/docs/MicroPythonPlug-in/assets/en_connect_board.gif)
216216

217217
### View the sample code file
218218

219219
The MicroPython plug-in provides a wealth of sample code and library files to view in the left active bar. Right-click on the sample file to add the sample file to the project from the drop-down menu.
220220

221-
![example_code](assets/check_example_en.png)
221+
![example_code](https://raw.githubusercontent.com/RT-Thread-packages/micropython/master/docs/MicroPythonPlug-in/assets/check_example_en.png)
222222

223223
### Run MicroPython files directly on the development board (kind for debug)
224224

225225
This feature is used to `quickly debug a single file` and is frequently used in debugging code. When we write the test program in a separate file, we can use this function to download the current python file to the memory of the development board to run, achieving the effect of rapid debugging. We can also use the shortcut key `Alt + q` to trigger this function.
226226

227-
![run_example](assets/direct_run_files_en.gif)
227+
![run_example](https://raw.githubusercontent.com/RT-Thread-packages/micropython/master/docs/MicroPythonPlug-in/assets/direct_run_files_en.gif)
228228

229229
### Run MicroPython code snippets on the development board
230230

231231
If you just want to debug a small amount of code without downloading files to the development board, you can use the **code snippet** function. You can run the selected code in the REPL environment by selecting the snippet you want to run in the editor, and then selecting the `execute the selected MicroPython code` option on the device from the right-click menu.
232232

233-
![run_code_snippet](assets/en_run_snippets.gif)
233+
![run_code_snippet](https://raw.githubusercontent.com/RT-Thread-packages/micropython/master/docs/MicroPythonPlug-in/assets/en_run_snippets.gif)
234234

235235
### Download files/folders to the development board
236236

@@ -245,21 +245,21 @@ By entering the command `os.listdir()` in `repl`, you can check whether the corr
245245
| remove file | `os.remove("file_to_del")` |
246246
| remove folder | `os.rmdir("folder_to_del")` |
247247

248-
![auto_complete](assets/download_file_floder_en.gif)
248+
![auto_complete](https://raw.githubusercontent.com/RT-Thread-packages/micropython/master/docs/MicroPythonPlug-in/assets/download_file_floder_en.gif)
249249

250250
### project synchronization
251251

252252
Click the synchronization button `in the lower left corner` to start the project synchronization function. This feature synchronizes `all directory files` in the local project to the development board's file system. This feature is recommended to be used `after the code is debugged`, without the need to synchronize the project frequently during debugging.
253253

254254
After the project synchronization is completed, `the list of files` in the DEVICE can be seen in the `DEVICE FILES LIST column`.
255255

256-
![run_code_snippet](assets/sync_files_en.gif)
256+
![run_code_snippet](https://raw.githubusercontent.com/RT-Thread-packages/micropython/master/docs/MicroPythonPlug-in/assets/sync_files_en.gif)
257257

258258
### Intelligent code completion based on MicroPython
259259

260260
This plug-in supports `intelligent code completion` and syntax checking `based on MicroPython syntax`, which is a powerful tool for developing MicroPython code. It allows developers to write functions while looking at API parameter hints, and it gives them a visual reminder that makes it easier to find errors in code.
261261

262-
![auto_complete](assets/auto_complete.gif)
262+
![auto_complete](https://raw.githubusercontent.com/RT-Thread-packages/micropython/master/docs/MicroPythonPlug-in/assets/auto_complete.gif)
263263

264264
## Matters needing attention
265265

0 commit comments

Comments
 (0)