Skip to content

Commit 485754c

Browse files
committed
improve external module section
1 parent 5b32259 commit 485754c

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

content/micropython-course/course/01.introduction-python/02.intro-to-micropython.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,17 +146,19 @@ For example, to use a module for a specific sensor, we need to install it **exte
146146

147147
### Install External Modules
148148

149-
To install an external module, we are going to use a package manager called `mip`. With `mip`, we can install a module on the board by connecting to Wi-Fi® and downloading the module directly to the board. So how do we do this?
149+
To install an external module, we are going to use a package manager called `mip`. With `mip`, we can install a module on the board by connecting to Wi-Fi® and downloading the module directly to the board. Installing external modules is done in two steps:
150150

151-
To download external modules from the internet we first a foremost need a working internet connection. To connect to your local Wi-Fi you can upload the following script to your `boot.py` file. Why `boot.py`?
151+
1. Establish a Wi-Fi connection.
152152

153-
Because we want to make sure our board connects to the internet as soon as it boots up.
153+
2. Download the module from a specific URL using `mip`.
154154

155-
***Please note that you need to add your own Wi-Fi network and password in the `WIFI_NETWORK` and `WIFI_PASSWORD` fields.***
155+
To connect to your local Wi-Fi you can upload the following script to `boot.py` file. We choose `boot.py` because we want to make sure our board connects to the internet as soon as it boots up.
156+
157+
**Connect to Wi-Fi**
156158

157159
![Wi-Fi script inside boot.py](./assets/boot.png)
158160

159-
**Connect to Wi-Fi**
161+
***Please note that you need to add your own Wi-Fi network and password in the `WIFI_NETWORK` and `WIFI_PASSWORD` fields.***
160162

161163
```python
162164
"""
@@ -179,11 +181,12 @@ print("Connected to ",WIFI_NETWORK)
179181

180182
![Successful connection](./assets/wifiConnected.png)
181183

182-
Next, you need to run a script that installs the external module from a specific url. Place the following script inside `main.py` and press run.
184+
**Install external modules**
185+
186+
Next, you need to run a script that installs the external module from a specific URL. Upload the following script to `main.py`.
183187

184188
![Module installation script inside main.py](./assets/main.png)
185189

186-
**Install external module**
187190
```python
188191
'''
189192
This script installs external modules using mip

0 commit comments

Comments
 (0)