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/03.micropython/02.environment/03.modules/modules.md
+12-8Lines changed: 12 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
---
2
2
title: 'Modules'
3
-
description: 'Understanding Modules and how to use them.'
3
+
description: 'Understanding modules in MicroPython and how to use them.'
4
4
author: 'Pedro Lima'
5
5
tags: [MicroPython, Modules]
6
6
---
7
7
8
8
9
-
In this article, we’ll cover how modules work in MicroPython, explore a few built-in modules, and demonstrate how to install an external package like Modulino to extend our MicroPython project’s functionality.
9
+
In this guide, we’ll cover how modules work in MicroPython, explore a few built-in modules, and demonstrate how to install an external package like Modulino to extend our MicroPython project’s functionality.
10
10
11
11
## What Are Modules?
12
12
@@ -38,7 +38,7 @@ In this example, `time.sleep()` introduces a delay. Built-in modules like `time`
38
38
39
39
## External Modules
40
40
41
-
Some modules aren’t included with the default MicroPython installation and need to be installed separately. External modules, often provided by the community or specific hardware packages, extend MicroPython’s functionality. For example, the **Modulino** library is an external module that provides tools for working with Arduino Modulinos.
41
+
Some modules aren’t included with the default MicroPython installation and need to be installed separately. External modules, often provided by the community or specific hardware packages, extend MicroPython’s functionality. For example, the [Modulino library]() is an external module that provides tools for working with Arduino Modulinos.
42
42
43
43
To demonstrate how to use external modules, we’ll go through the steps to install the Modulino package on an Arduino board.
44
44
@@ -51,37 +51,41 @@ Before we can install external modules, we need to have MicroPython running on o
51
51
- Press the "Refresh" button if the board does not appear.
52
52
- Click "**Install MicroPython**" and wait for the installation to complete.
53
53
54
+
***For more details, visit the [MicroPython installation guide]()***
55
+
54
56
### Step 2: Install the Modulino Package
55
57
56
58
To install the Modulino package, we’ll use `mpremote`, a tool that allows us to install MicroPython packages directly onto our board from the command line.
57
59
58
-
1.**Install `mpremote`**: Make sure Python is installed on your computer, then open a terminal and type:
60
+
1. Make sure Python is installed on your computer
61
+
2. Open a terminal on your machine.
62
+
3. Run the following command to install `mpremote`.
59
63
60
64
```bash
61
65
pip install mpremote
62
66
```
63
67
64
-
2.**Connect to Your Board**: Find your board’s serial port by running:
68
+
4. With `mpremote` installed, run the following script to find our board's serial port.
3.**Install the Modulino Package**: Use the following command to install the Modulino package, replacing `<PORT>` with your board’s port:
82
+
5.Use the following command to install the Modulino package (or any other package we want to install), replacing `<PORT>` with our board’s port retrieved in the previous step.
4.**Verify Installation**: After installation, check Arduino Labs for MicroPython. You should see a `/lib` folder with the Modulino library inside, indicating a successful installation.
88
+
6.After the installation, open Arduino Labs for MicroPython, and connect your board. In the board's files, we should see a `/lib` folder with the Modulino library inside, indicating a successful installation.
0 commit comments