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: content/micropython-course/course/01.introduction-python/02.intro-to-micropython.md
+39-14Lines changed: 39 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -146,39 +146,64 @@ For example, to use a module for a specific sensor, we need to install it **exte
146
146
147
147
### Install External Modules
148
148
149
-
To install an external module, we are going to use something called `mip`. With `mip`, we can install a module on the board directly, 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. So how do we do this?
150
150
151
-
Below is a script that first connects to Wi-Fi®, and then downloads a specific module. In this case, we will provide a URL to a file stored on GitHub (the raw file). In this case, we will install the `lis3dh` module, which will be used later on in this course.
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`?
152
152
153
-
Please note that you need to add your own Wi-Fi® network and password in the `WIFI_NETWORK` and `WIFI_PASSWORD` fields.
153
+
Because we want to make sure our board connects to the internet as soon as it boots up.
154
+
155
+
***Please note that you need to add your own Wi-Fi network and password in the `WIFI_NETWORK` and `WIFI_PASSWORD` fields.***
Once you run the script successfully, you will have installed the module on your board.
196
+
Press run and you should see the following inside the REPL:
197
+
198
+

199
+
200
+
In this case, we will provide a URL to a file stored on GitHub (the raw file). The script installs the `lis3dh` module, which will be used later on in this course.
201
+
202
+
You can verify that the module was installed correctly by pressing `Files` and checking inside the `lib` folder. You should see a file called `lis3dh.py` inside.
203
+
204
+

205
+
206
+
When asked later in the course to install external modules simply paste the provided script into `main.py` and press run.
182
207
183
208
### Removing Modules
184
209
@@ -215,9 +240,9 @@ OSError: -202
215
240
216
241
Some things to check are:
217
242
- Did you enter your network credentials properly?
218
-
- Did you already connect to Wi-Fi®?
243
+
- Did you already connect to Wi-Fi?
219
244
220
-
If the error persist, you can try to "soft-reset" the board, by clicking the **"Reset"** button, and run the script again.
245
+
If the error persists, you can try to "soft-reset" the board, by clicking the **"Reset"** button, and run the script again.
0 commit comments