Skip to content

Commit 36f27ae

Browse files
committed
review modules
1 parent 962fba4 commit 36f27ae

File tree

1 file changed

+12
-8
lines changed
  • content/micropython/03.micropython/02.environment/03.modules

1 file changed

+12
-8
lines changed

content/micropython/03.micropython/02.environment/03.modules/modules.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
22
title: 'Modules'
3-
description: 'Understanding Modules and how to use them.'
3+
description: 'Understanding modules in MicroPython and how to use them.'
44
author: 'Pedro Lima'
55
tags: [MicroPython, Modules]
66
---
77

88

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.
1010

1111
## What Are Modules?
1212

@@ -38,7 +38,7 @@ In this example, `time.sleep()` introduces a delay. Built-in modules like `time`
3838

3939
## External Modules
4040

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.
4242

4343
To demonstrate how to use external modules, we’ll go through the steps to install the Modulino package on an Arduino board.
4444

@@ -51,37 +51,41 @@ Before we can install external modules, we need to have MicroPython running on o
5151
- Press the "Refresh" button if the board does not appear.
5252
- Click "**Install MicroPython**" and wait for the installation to complete.
5353

54+
***For more details, visit the [MicroPython installation guide]()***
55+
5456
### Step 2: Install the Modulino Package
5557

5658
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.
5759

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`.
5963

6064
```bash
6165
pip install mpremote
6266
```
6367

64-
2. **Connect to Your Board**: Find your boards serial port by running:
68+
4. With `mpremote` installed, run the following script to find our board's serial port.
6569

6670
```bash
6771
mpremote connect list
6872
```
6973

70-
This command should return something like:
74+
This command should return something akin to:
7175

7276
```bash
7377
/dev/cu.usbmodem101 ecda3b60a4dccb3f 2341:056b Arduino Nano ESP32
7478
```
7579

7680
- Copy the port, e.g., `/dev/cu.usbmodem101`.
7781

78-
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.
7983

8084
```bash
8185
mpremote connect <PORT> mip install github:arduino/arduino-modulino-mpy
8286
```
8387

84-
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.
8589

8690
![MicroPython Lab Files](./assets/microPythonLabsFiles.png)
8791

0 commit comments

Comments
 (0)