Skip to content

Commit 51c80a2

Browse files
Package installer steps added
1 parent 5718f78 commit 51c80a2

File tree

6 files changed

+50
-26
lines changed

6 files changed

+50
-26
lines changed
125 KB
Loading
8.83 KB
Loading

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

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,41 +53,63 @@ Before we can install external modules, we need to have MicroPython running on o
5353

5454
***For more details, visit the [MicroPython installation guide](/micropython/first-steps/install-guide)***
5555

56+
I’ll integrate the **Package Installer Tool** section into your article under **Step 2: Install the Modulino Package** while maintaining consistency with the existing structure. Here’s the revised section:
57+
5658
### Step 2: Install the Modulino Package
5759

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.
60+
There are multiple ways to install external modules in MicroPython. We’ll cover two common methods:
61+
- **Using the MicroPython Package Installer (GUI)** (Recommended for ease of use)
62+
- **Using `mpremote` (Command-line installation)**
63+
64+
#### **Option 1: Using the MicroPython Package Installer (Recommended)**
65+
The **MicroPython Package Installer** is a graphical tool that makes it easy to install external modules without needing to use the command line.
66+
67+
1. **Download and install** the [MicroPython Package Installer](https://github.com/arduino/lab-micropython-package-installer/releases).
68+
2. **Open the tool** and plug in your board.
69+
![Board connected via USB](assets/usb-comp.png)
70+
71+
If the board does not appear in the `Detected Boards` section, click `Reload`.
72+
If the board is still not detected, ensure no other programs (e.g., a code editor) are using the board's COM port.
73+
74+
3. **Search for the Modulino package** using the search feature.
75+
4. Click **Install** and wait for the installation confirmation.
76+
5. **Disconnect the board** from the tool before returning to your code editor to avoid conflicts due to the COM port being busy.
77+
78+
![Package Installer UI](assets/package-installer.png)
5979

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`.
80+
#### **Option 2: Using `mpremote` (Command Line Installation)**
81+
For those who prefer the command line, we can use `mpremote`, a Python tool that allows direct installation from the terminal.
82+
83+
1. Make sure **Python** is installed on your computer.
84+
2. Open a terminal and install `mpremote` with:
6385

6486
```bash
6587
pip install mpremote
66-
```
88+
```
6789

68-
4. With `mpremote` installed, run the following script to find our board's serial port.
90+
3. Run the following command to find your board's serial port:
6991

7092
```bash
7193
mpremote connect list
72-
```
94+
```
7395

74-
This command should return something akin to:
96+
Example output:
7597

76-
```bash
98+
```
7799
/dev/cu.usbmodem101 ecda3b60a4dccb3f 2341:056b Arduino Nano ESP32
78100
```
79101

80-
- Copy the port, e.g., `/dev/cu.usbmodem101`.
102+
- Copy the **port**, e.g., `/dev/cu.usbmodem101`.
81103

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.
104+
4. Use the following command to install the Modulino package (or any other package), replacing `<PORT>` with your board’s serial port:
83105

84106
```bash
85107
mpremote connect <PORT> mip install github:arduino/arduino-modulino-mpy
86108
```
87109

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.
110+
5. After installation, open **Arduino Labs for MicroPython** and connect your board. You should see a `/lib` folder with the Modulino library inside, confirming a successful installation.
89111

90-
![MicroPython Lab Files](./assets/microPythonLabsFiles.png)
112+
![MicroPython Lab Files](./assets/microPythonLabsFiles.png)
91113

92114
## Organizing and Using Modules
93115

125 KB
Loading
8.83 KB
Loading

content/micropython/05.modulinos/01.installation/installation.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,28 @@ We will also need the following software:
2323
- [MicroPython Labs](https://lab-micropython.arduino.cc/)
2424
- [MicroPython Installer](https://labs.arduino.cc/en/labs/micropython-installer)
2525
- [Modulino MicroPython package](https://github.com/arduino/arduino-modulino-mpy)
26+
- [MicroPython package installer](https://github.com/arduino/lab-micropython-package-installer/releases)
2627

2728
## Install MicroPython
2829

29-
To follow this tutorial, we will need to install MicroPython on our Arduino board. The easiest way is to install it using the [MicroPython Installer](https://labs.arduino.cc/en/labs/micropython-installer).
3030

31-
- Open the installer.
32-
- Connect the board to the computer.
33-
- If it does not appear press the refresh button.
34-
- Press "Install MicroPython".
35-
- Wait for the installation to finish.
31+
### Option 1: Using the MicroPython Package Installer **(Recommended)**
3632

37-
![MicroPython Installer](./assets/microPythonInstaller.png)
33+
The **MicroPython Package Installer** is a graphical tool that simplifies the installation of external modules without requiring command-line interaction.
3834

39-
***More details on installing MicroPython on our board are available in the [MicroPython installation guide](/micropython/first-steps/install-guide).***
35+
1. **Download and install** the [MicroPython Package Installer](https://github.com/arduino/lab-micropython-package-installer/releases).
36+
2. **Open the tool** and plug in your board.
4037

41-
## Install Modulino Package
38+
![Board connected via USB](assets/usb-comp.png)
39+
If the board does not appear in the `Detected Boards` section, click `Reload`.
40+
If the board is still not detected, ensure no other programs (e.g., a code editor) are using the board's COM port.
41+
1. **Search for the Modulino package** using the search feature.
42+
2. Click **Install** and wait for the installation confirmation.
43+
3. **Disconnect the board** from the tool before returning to your code editor to avoid conflicts due to the COM port being busy.
4244

43-
To program Modulinos using MicroPython we must first install the Modulino package. It's where all the code, necessary to interact with the Modulinos is being stored.
45+
![Package Installer UI](assets/package-installer.png)
4446

45-
### Terminal Installation
47+
### Option 2: Terminal Installation
4648

4749
To install a module, we can use `mpremote`. Currently, we will need a version of Python installed on our computer.
4850

@@ -63,15 +65,15 @@ To install a module, we can use `mpremote`. Currently, we will need a version of
6365
```
6466
The port here is `/dev/cu.usbmodem101`. Copy this.
6567

66-
1. Now, run the following the command. Make sure to replace `<PORT>` with the port of our device obtained in the previous step.
68+
3. Now, run the following the command. Make sure to replace `<PORT>` with the port of our device obtained in the previous step.
6769
```bash
6870
mpremote connect <PORT> mip install github:arduino/arduino-modulino-mpy
6971
```
7072

7173
Upon completion, we should see something like this in the terminal, to verify the success of the installation:
7274
![Successful installation.](assets/package-installed.png)
7375

74-
2. Great job. We have now installed the Modulino package on our board!
76+
4. Great job. We have now installed the Modulino package on our board!
7577

7678
**Troubleshooting:**
7779
- Make sure your board is connected to your computer.

0 commit comments

Comments
 (0)