Skip to content

Commit f025bbc

Browse files
committed
update installation tutorial
1 parent 2a97e65 commit f025bbc

File tree

2 files changed

+68
-36
lines changed

2 files changed

+68
-36
lines changed
Loading

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

+68-36
Original file line numberDiff line numberDiff line change
@@ -7,56 +7,90 @@ hero_image: "./hero-banner.png"
77

88
---
99

10-
This article will guide you through the installation process for programming the Arduino Modulinos with Micropython.
10+
In this tutorial, we will go through the installation process required for programming the Arduino Modulinos with MicroPython.
1111

1212
## Goals
1313

1414
The goals of this tutorial are:
1515

16-
- learn how to install MicroPython on your Arduino board.
17-
- learn how to install MicroPython packages.
18-
- learn how to run a simpe sketch using MicroPython labs.
16+
- Learn how to install a MicroPython package on your board (the Modulino package).
1917

2018
## Hardware & Software Needed
2119

22-
- [MicroPython Labs](https://lab-micropython.arduino.cc/)
20+
You will need a MicroPython compatible board that works with the Modulinos:
2321
- [Arduino Nano ESP32](https://store.arduino.cc/products/nano-esp32?queryID=undefined)
22+
- [Arduino Nano RP2040 Connect](https://store.arduino.cc/en-se/products/arduino-nano-rp2040-connect)
23+
24+
You will also need the following software:
25+
- [MicroPython Labs](https://lab-micropython.arduino.cc/)
2426
- [MicroPython Installer](https://labs.arduino.cc/en/labs/micropython-installer)
25-
- [Modulino MicroPython Package](https://github.com/arduino/arduino-modulino-mpy)
27+
- [Modulino MicroPython package](https://github.com/arduino/arduino-modulino-mpy)
2628

2729
## Install MicroPython
2830

29-
If you haven't done so already, you need to install MicroPython on your Arduino board. The easiest way is to install it using the [MicroPython Installer](https://labs.arduino.cc/en/labs/micropython-installer).
31+
To follow this tutorial, you will need to install MicroPython on your Arduino board. The easiest way is to install it using the [MicroPython Installer](https://labs.arduino.cc/en/labs/micropython-installer).
3032

31-
- Open the installer
33+
- Open the installer.
3234
- Connect your board.
3335
- If it does not appear press the refresh button.
3436
- Press "Install MicroPython".
3537
- Wait for the installation to finish.
3638

3739
![MicroPython Installer](./assets/microPythonInstaller.png)
3840

39-
## Install Modulino Package
40-
41-
To program Modulinos using MicroPython you must first install the Modulino Package. It's where all the code, necessary to interact with the Modulinos is being stored.
42-
43-
The easiest way of installing it is using `mpremote`.
44-
45-
***If this is your first time using `mpremote`, check out the [Getting Started article]().***
46-
47-
Once you have everything set up, run:
41+
***More details on installing MicroPython on your board are available in the [MicroPython Installation guide]().***
4842

49-
```bash
50-
mpremote connect <PORT> mip install github:arduino/arduino-modulino-mpy
51-
```
52-
53-
![MicroPython Package Installation](./assets/MicroPythonPackageInstallationDone.png)
43+
## Install Modulino Package
5444

55-
This will install all necessary packages on your Arduino board.
45+
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.
46+
47+
There are two ways of installing a package:
48+
- Through a terminal
49+
-
50+
51+
### Terminal Installation
52+
53+
The easiest way of installing it is using `mpremote`. Currently, we will need a version of Python installed on our computer.
54+
55+
1. Open a terminal, and write the following line:
56+
```bash
57+
pip install mpremote
58+
```
59+
This will install `mpremote`, which makes it possible to install packages on our board via your computer.
60+
2. With `mpremote` installed, we need to run the following command to identify our board's serial port:
61+
```bash
62+
mpremote connect list
63+
```
64+
65+
Which will give us something like this:
66+
67+
```bash
68+
/dev/cu.usbmodem101 ecda3b60a4dccb3f 2341:056b Arduino Nano ESP32
69+
```
70+
- The port here is `/dev/cu.usbmodem101`. Copy this.
71+
72+
3. Now, run the following the command. Make sure to replace `<PORT>` with the port of your device obtained in the previous step.
73+
```bash
74+
mpremote connect <PORT> mip install github:arduino/arduino-modulino-mpy
75+
```
76+
77+
Upon completion, we should see something like this in the terminal, to verify the success of the installation:
78+
![Successful installation.](assets/package-installed.png)
79+
80+
4. Great job. We have now installed the Modulino package on your board!
81+
82+
**Troubleshooting:**
83+
- Make sure your board is connected to your computer.
84+
- Make sure it is **not** connected in the Arduino Lab for MicroPython, as this might disturb the connection.
85+
- If you are unable to run `mpremote` in the terminal, this means it is not installed.
86+
- If you are unable to run `python` in the terminal, make sure you have installed Python (you can download and install it [here](https://www.python.org/downloads/))
87+
- If you have installed Python and it is still not working, try running `python3` and `pip3` instead.
88+
- If you installed Python while having the terminal open, try closing the terminal and re-opening it.
89+
- If you run `mpremote` and there's no board appearing in the list, try re-installing the firmware on your board as it might have failed during installation.
5690
5791
## MicroPython Labs
5892
59-
Let's verify that everything was installed and is working correctly. Go to [MicroPython Labs](https://lab-micropython.arduino.cc/) and click on the connect icon in the top left corner.
93+
We can now verify that everything was installed correctly. Go to [MicroPython Labs](https://lab-micropython.arduino.cc/) and click on the connect icon in the top left corner.
6094
6195
![MicroPython Labs](./assets/microPythonLabs.png)
6296
@@ -70,18 +104,16 @@ You should see a folder called `lib` and a file called `boot.py`. Go ahead and p
70104
71105
![MicroPython Lab Files](./assets/microPythonLabsFiles.png)
72106
73-
If you see this, it means the package has been installed successfully. If you want to to go even deeper, you can open the modulino folder and have a look at the individual Modulino packages. Don't worry, you don't have to understand what those files mean exactly to continue.
74-
75-
## First Sketch
76-
77-
Copy the following line to the MicroPython Labs Editor and press "Run".
78-
79-
```python
80-
print("Hello, World!")
81-
```
82-
83-
You should see "Hello, World", being printed in the commandline.
107+
If you see this, it means the package has been installed successfully.
84108
85109
## Next Steps
86110
87-
Now that you have successfully installed everything it's time to program your first Modulino.
111+
Now that you have successfully installed everything it's time to program your first Modulino. Below are links to the documentation for all Modulinos. They are also accessible in the side menu at [Arduino Docs - MicroPython](https://docs.arduino.cc/micropython/), under "Modulinos".
112+
113+
- [Modulino Distance](/micropython/modulinos/modulino-distance)
114+
- [Modulino Pixels](/micropython/modulinos/modulino-pixels)
115+
- [Modulino Buzzer](/micropython/modulinos/modulino-buzzer)
116+
- [Modulino Buttons](/micropython/modulinos/modulino-buttons)
117+
- [Modulino Knob](/micropython/modulinos/modulino-knob)
118+
- [Modulino Movement](/micropython/modulinos/modulino-movement)
119+
- [Modulino Thermo](/micropython/modulinos/modulino-thermo)

0 commit comments

Comments
 (0)