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/00.first-steps/01.install-guide/installing-micropython.md
+76-35
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,22 @@
1
1
---
2
2
featured: micropython-101
3
-
title: '1. Introduction to Arduino'
4
-
description: 'Learn about the Arduino platform'
5
-
author: 'Karl Söderby'
3
+
title: 'Installing MicroPython'
4
+
description: 'Learn how to install MicroPython on your Arduino board.'
5
+
author: 'Pedro Lima & Karl Söderby'
6
6
hero_image: "./hero-banner.png"
7
7
---
8
8
9
9
# Installing MicroPython
10
10
11
-
In this article, we'll walk you through the process of installing MicroPython on your Arduino board. By the end of this guide, you (and your board) will be ready to write and run your first MicroPython script. Let's get started!
11
+
In this article, we will go through the necessary tools needed to install and run MicroPython on an Arduino board. By the end of this guide, we will be ready to write and run our first MicroPython script. Let's get started!
12
12
13
13
## Requirements
14
14
15
-
Before you begin, make sure you have the following:
15
+
Before we start, let's check the requirements:
16
16
17
-
### Supported Arduino Boards
18
-
MicroPython is officially supported on several Arduino boards. Here’s a list of compatible boards:
17
+
### MicroPython Compatible Arduino Boards
18
+
19
+
MicroPython is officially supported on several Arduino boards. Here’s a list of the compatible boards:
@@ -35,50 +36,90 @@ MicroPython is officially supported on several Arduino boards. Here’s a list o
35
36
36
37
37
38
### Software Requirements
38
-
-**Arduino Labs for Micropython**: Ensure you have the [latest version](https://labs.arduino.cc/en/labs/micropython) of the IDE. (Optional)
39
-
-**MicroPython Firmware Installer**: [This installer](https://labs.arduino.cc/en/labs/micropython-installer) is needed to upload the MicroPython firmware onto your Arduino board. You can download it from the official Arduino website under the MicroPython section.
40
39
41
-
## How to setup your board
40
+
-[MicroPython Firmware Installer](https://labs.arduino.cc/en/labs/micropython-installer) - the firmware installer is needed to install MicroPython on our Arduino board.
41
+
-[Arduino Lab for Micropython](https://labs.arduino.cc/en/labs/micropython) - Arduino Lab for MicroPython is an editor where we can create and run MicroPython scripts on our Arduino board.
42
+
43
+
***Note that the editor is also available online, at [Arduino Cloud - Arduino Labs for MicroPython](https://lab-micropython.arduino.cc/)
44
+
45
+
## Install MicroPython
42
46
43
-
1.If you haven’t already, download the [Micropython Firmware Installer](https://labs.arduino.cc/en/labs/micropython-installer) and launch it.
44
-
2.Plug your board, it should be recognized by the installer.
3. Press **INSTALL MICROPYTHON**. A loading animation will appear.
47
51
48
-
Once the firmware is installed a "Installation successful" message will appear. At this point you can safely close the installer as your board is now ready for tinkering!
Once the firmware is installed a "Installation successful" message will appear. At this point you can safely close the installer as your board is now ready for tinkering!
After installing MicroPython on your board, we will need an editor to write code. We now have the option to choose the **offline** or **online** option.
58
+
59
+
### Offline Setup
60
+
61
+
First, download the latest version of [Arduino Lab for MicroPython](https://labs.arduino.cc/en/labs/micropython) for your operative system. See instructions for MacOS / Windows below:
62
+
63
+
#### MacOS
64
+
65
+
Run the downloaded file, and move it to your **"Applications"** folder.
66
+
67
+
![Installation MacOS.]()
50
68
51
-
###IDE setup
69
+
#### Windows
52
70
53
-
#### Offline IDE
71
+
Unzip the downloaded file, and run the executeable file (`.exe`).
54
72
55
-
After downloading the [latest version](https://labs.arduino.cc/en/labs/micropython) of the IDE you can use it for the first time by:
56
-
- Unpack the compressed folder you downloaded.
57
-
- Execute "Arduino Lab for MicroPython.exe"
73
+
![Installation Windows]()
58
74
59
-
####Online IDE
75
+
### Online Setup
60
76
61
-
Alternatively, you can use the IDE without installing it by using the online version available [here](https://lab-micropython.arduino.cc/).
77
+
Alternatively, we can use the IDE without the need of installing anything. Simply visit the link below:
78
+
-[Arduino Lab for MicroPython (online).](https://lab-micropython.arduino.cc/).
62
79
63
-
####Connecting Board and IDE
80
+
## Connecting Board and IDE
64
81
65
-
1. Plug your Arduino board into your computer using a USB cable.
66
-
2. Press the connection button on the top left corner of the window. This will look like a plug and socket as in this image:
67
-
TODO: ADD IMAGE OF CONNECTION
68
-
3. Select the COM port where your board is connected.
82
+
At this point in the tutorial, we have
83
+
- Installed MicroPython on our board
84
+
- Downloaded and installed the editor (or opted for the online version).
69
85
70
-
You are now ready to upload your first sketch.
71
-
TODO: A 4 step screenshot to explain the processimage
86
+
We will now try out running a script on the board, to make sure things are working properly.
87
+
88
+
1. Plug the Arduino board into the computer using a USB cable.
89
+
![Connect board to computer.]()
90
+
2. Press the connection button on the top left corner of the window.
91
+
![Connect the editor to the board.]()
92
+
3. The connected Arduino board should appear, and we can click it:
93
+
![Select board.]()
94
+
95
+
We have now set up all necessary steps for running a script!
96
+
97
+
## Running a Test Script
98
+
99
+
With the installation and setup complete, let's try out running a very simple script: **Hello World!**
100
+
101
+
1. In the text area field of the editor, write the following: `print("Hello World!")`
102
+
![Write hello world.]()
103
+
2. Click on the play symbol (RUN).
104
+
![Run the script.]()
105
+
3. After running it, you should see `Hello World!` in the black box. This is the board sending the **"Hello World!"** back to you, because the script is run on the board, not on the computer. This means everything is successful, and you are ready to start writing MicroPython scripts!
106
+
![Hello world from the board.]()
72
107
73
108
## Troubleshooting
74
109
75
110
If you run into any issues during installation, here are some common problems and solutions:
76
111
77
-
### 1. **Board Not Detected**
78
-
-**Solution**: Ensure that your board is properly connected and the correct USB drivers are installed. Try using a different USB cable or port.
112
+
-**Board Not Detected** - if you cannot locate your board, ensure that your board is properly connected and the correct USB drivers are installed. Try using a different USB cable, or double tap the reset button on the board. If a light starts fading, it means it is in default mode, and is ready to be installed!
113
+
114
+
-**Unable to Install Firmware** - double-check that the MicroPython Firmware Installer was able to install the firmware and that your board is compatible (it will not show up on the installer if it is not). Also, verify that no other software is using the same serial port.
115
+
116
+
## Summary
117
+
118
+
By following these steps, you should be able to successfully install MicroPython on your Arduino board and run your first script.
119
+
120
+
### Next Steps
79
121
80
-
### 2. **Unable to Flash Firmware**
81
-
-**Solution**: Double-check that the MicroPython Firmware Installer was able to burn the firmware and that your board is compatible(it will not show up on the installer if it is not). Also, verify that no other software is using the serial port.
122
+
This tutorial is **Part Two** of the **"First Steps"** series. We recommend you following the next tutorial that will allow you to control the Arduino board's LED.
123
+
-[First Steps - Part Three]()
124
+
82
125
83
-
By following these steps, you should be able to successfully install MicroPython on your Arduino board and run your first script. Stay tuned for more tutorials to help you get the most out of MicroPython!
84
-
For information on how to uploadyour first sketch please check [](). TODO: We need to add here the guide for first sketch once it is linkable
0 commit comments