Skip to content

[MicroPython] 101 course update #1736

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ Programming an Arduino using MicroPython is a slightly different experience. In

Over the years Arduino has released over a hundred different development boards, each different from the other. You choose the board depending on what you want to achieve, e.g. some boards have a Wi-Fi® module allowing you to connect to the Internet, and some have onboard sensors that allow you to record sensor data.

- [Next chapter: Introduction to MicroPython](/micropython-course/course/installation)
- [Next chapter: Introduction to MicroPython](/micropython/micropython-course/course/introduction-python)
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@ title: '2. MicroPython Installation Guide'
description: 'Learn how to install a code editor needed to program your board with MicroPython.'
---

## Goals

In this chapter we will go over how to install the prerequisite software: the **code editor** and the **MicroPython firmware installer**, that will enable you to dive into the learning activities of this course.
In this chapter we will go over how to install the prerequisite software: the **MicroPython firmware installer** and the **Arduino Labs for MicroPython (Code Editor)**. The installer will install a MicroPython firmware on your board, and the code editor will allow you to program the board with MicroPython.

## Software Required

![Arduino Labs for MicroPython and the Installer tool](./assets/logo.png)

The software you will have installed are:
Later in this chapter, we'll walk you through the installation process step by step. You can download the required software below, but if you do - please return to this page afterwards for instructions on what to do with them.
To run MicroPython code on your Arduino board, you will need:

- [Arduino Lab for MicroPython](https://labs.arduino.cc/en/labs/micropython)
- The [Arduino MicroPython Installer](https://labs.arduino.cc/en/labs/micropython-installer)
- [MicroPython Firmware Installer](https://labs.arduino.cc/en/labs/micropython-installer)

![The Installed Software](./assets/apps-open.png)

Expand All @@ -39,7 +40,7 @@ The **Firmware Installer** program will help install MicroPython on your board.

It will automatically download the latest version of the MicroPython firmware and install it on your board, so that all you need to do is to connect the board and press a button.

First [download the app here](), and extract the files to a folder on your computer.
First [download the app here](https://labs.arduino.cc/en/labs/micropython-installer), and extract the files to a folder on your computer.

If you're on macOS, move the application to your **Applications** folder.

Expand Down Expand Up @@ -113,4 +114,4 @@ To do this, **tap the reset button twice**, but not too fast (about 1 second bet

Congratulations! You’ve completed the installation chapter of MicroPython 101.

Having trouble? Continue to the troubleshooting section. Otherwise, move on to the [Next chapter](/micropython-course/course/digital).
Having trouble? Continue to the troubleshooting section. Otherwise, move on to the [Next chapter](/micropython/micropython-course/course/introduction-python).
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ There are several editors available, but in this course, we will use the [Arduin

![Screenshot of the labs editor](assets/code-editor.png)

***The [next chapter](/micropython-course/course/installation) is dedicated to using the Arduino Lab for MicroPython editor.***
***The [next chapter](/micropython/micropython-course/course/installation) is dedicated to using the Arduino Lab for MicroPython editor.***

## Connect to Your Board

Any time we want to interact and program our Nano ESP32, we need to connect to it. This requires the board to have MicroPython installed, which is covered in the [next chapter (installation)](/micropython-course/course/installation).
Any time we want to interact and program our Nano ESP32, we need to connect to it. This requires the board to have MicroPython installed, which is covered in the [next chapter (installation)](/micropython/micropython-course/course/installation).

To connect to your board, click on the **"Connect"** button in the editor.

Expand Down Expand Up @@ -253,4 +253,4 @@ If the error persists, you can try to "soft-reset" the board, by clicking the **

In this chapter, we learned a little bit about the key components in the MicroPython environment.

- [Next chapter: An Introduction to MicroPython](/micropython-course/course/python-cc)
- [Next chapter: An Introduction to MicroPython](/micropython/micropython-course/course/python-cc)
Original file line number Diff line number Diff line change
Expand Up @@ -205,4 +205,4 @@ In this Python crash course, we've covered some of the very fundamental aspects

In this course, we are focused on MicroPython, which is a micro-implementation of the language. This means that most core functionalities of the language is available, such as **operators, statements, loops and functions**.

- [Next Chapter: Digital Signals](/micropython-course/course/digital)
- [Next Chapter: Digital Signals](/micropython/micropython-course/course/digital)
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ while True:
print("BUTTON PRESSED!")
```

***Please note that the pin number reflects the GPIO on the ESP32-S3, not the Nano board. In the circuit, we are connecting the button to pin `D6`, but in the code, we use pin `9`. You can read more about this and see the full pin map [here](/micropython-course/course/introduction-python#nano-esp32--micropython-pinout).***
***Please note that the pin number reflects the GPIO on the ESP32-S3, not the Nano board. In the circuit, we are connecting the button to pin `D6`, but in the code, we use pin `9`. You can read more about this and see the full pin map [here](/micropython/micropython-course/course/introduction-python#nano-esp32--micropython-pinout).***

Then, click on the **Run"** button to run the script. Now, if we click the button, we should see a message in the terminal: **"BUTTON PRESSED!"**.

Expand Down Expand Up @@ -97,4 +97,4 @@ Digital signals are characterized by two states: a HIGH state and a LOW state. T

These exercises provide hands-on experience with digital signals, enabling the reader to understand how to read input from a button and control output to an LED using the Nano ESP32 board.

- [Next Chapter: Analog I/O & PWM Signals](/micropython-course/course/analog)
- [Next Chapter: Analog I/O & PWM Signals](/micropython/micropython-course/course/analog)
Original file line number Diff line number Diff line change
Expand Up @@ -111,5 +111,5 @@ These exercises provides an understanding of how to read analog signals and util

The concepts covered in this chapter are fundamental in working with analog signals and can be applied in various projects and applications.

- [Next Chapter: Serial Protocols](/micropython-course/course/serial)
- [Next Chapter: Serial Protocols](/micropython/micropython-course/course/serial)

Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ To use this module, you need to have the `lis3dh` module installed. Install it b
mip.install("https://raw.githubusercontent.com/tinypico/tinypico-micropython/master/lis3dh%20library/lis3dh.py")
```

***For how to use `mip.install()`, please see the instructions in the [Install External Modules](/micropython-course/course/introduction-python#install-external-modules) section in the "Introduction to MicroPython" chapter.***
***For how to use `mip.install()`, please see the instructions in the [Install External Modules](/micropython/micropython-course/course/introduction-python#install-external-modules) section in the "Introduction to MicroPython" chapter.***

Open the code editor, and copy paste the following script to the `main.py` file, then click on the **"Run"** button to run it.

Expand Down Expand Up @@ -168,5 +168,5 @@ Serial protocols is an advanced topic, and in this chapter we have only covered

To learn more about serial protocols, you can visit the ["communication" section in docs.arduino.cc](https://docs.arduino.cc/learn/#communication).

- [Next Chapter: Internet of Things with MicroPython](/micropython-course/course/internet-of-things)
- [Next Chapter: Internet of Things with MicroPython](/micropython/micropython-course/course/internet-of-things)

Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@ If you want to make this, you should look into getting a display, in which you c

Below are some links that you may find useful:

- [4 Digit Display Example](/micropython-course/course/examples#4-digit-display)
- [Buzzer Example](/micropython-course/course/examples#buzzer)
- [OLED Display Example](/micropython-course/course/examples#oled-screen)
- [4 Digit Display Example](/micropython/micropython-course/course/examples#4-digit-display)
- [Buzzer Example](/micropython/micropython-course/course/examples#buzzer)
- [OLED Display Example](/micropython/micropython-course/course/examples#oled-screen)

## Summary

Expand All @@ -244,4 +244,4 @@ We learned how to:

IoT is a **very** broad field and you have only just discovered a fraction of it. MicroPython makes it easier for you to build projects that are in sync with the world.

- [Next Chapter: Component Examples](/micropython-course/course/examples)
- [Next Chapter: Component Examples](/micropython/micropython-course/course/examples)
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ mip.install(URL)

Running this script will install the module on your board, inside a folder called `lib`. You can check this out under **"Files"** while your board is connected via your MicroPython editor.

***How to install modules are explained in more detail in the [Introduction to MicroPython](/micropython-course/course/introduction-python) chapter.***
***How to install modules are explained in more detail in the [Introduction to MicroPython](/micropython/micropython-course/course/introduction-python) chapter.***

### Removing Modules

If you install too many modules, you will run out of space. You can remove a module directly in the editor, by selecting the file and clicking on the **"Delete"** icon.

***For more detailed instructions, see the [Removing Modules](/micropython-course/course/introduction-python#removing-modules) section in the second chapter.***
***For more detailed instructions, see the [Removing Modules](/micropython/micropython-course/course/introduction-python#removing-modules) section in the second chapter.***

## Button

Expand Down