Skip to content

Commit 1d7d448

Browse files
authored
Merge pull request #663 from arduino/karlsoderby/python-update
Python Guide Updates
2 parents aedbabc + 3ba45f8 commit 1d7d448

File tree

4 files changed

+33
-14
lines changed

4 files changed

+33
-14
lines changed

content/learn/03.programming/05.arduino-and-python/arduino-and-python.md

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
---
22
author: 'Karl Söderby'
3-
title: 'Python with Arduino Boards'
4-
description: 'Learn about compatibility between the popular Python language and Arduino boards, how to set up your environment, and discover in-depth tutorials and useful links.'
3+
title: 'MicroPython with Arduino Boards'
4+
description: 'Learn about compatibility between the popular MicroPython implementation and Arduino boards, how to set up your environment, and discover in-depth tutorials and useful links.'
55
tags:
6-
- Python
6+
- MicroPython
7+
- Arduino Lab
78
- OpenMV
89
hero_position: 1
910
---
1011

11-
## Overview
12+
***To download the firmware required to run MicroPython on your Arduino board, visit the [Arduino MicroPython downloads page](/micropython).***
1213

13-
[MicroPython](https://micropython.org/) is an implementation of the [Python programming language](https://www.python.org/) that comes with a subset of the Python standard library, and is designed **to run on microcontrollers**. A great advantage of using MicroPython is that it is easy to learn and has [great documentation](http://docs.micropython.org/en/latest/) for a number of boards. At the moment, there are four boards that can be used together with MicroPython, you can read more about them in the [compatible boards section](#compatible-boards).
14+
[MicroPython](https://micropython.org/) is an implementation of the [Python programming language](https://www.python.org/) that comes with a subset of the Python standard library, and is designed **to run on microcontrollers**.
1415

15-
Arduino officially supports [OpenMV's branch of MicroPython](https://github.com/openmv/micropython), and through the [OpenMV IDE](https://openmv.io/pages/download) you can install MicroPython, connect/disconnect your board and upload your scripts
16+
A great advantage of using MicroPython is that it is easy to learn and has [great documentation](http://docs.micropython.org/en/latest/) for a number of boards. At the moment, there are four boards that can be used together with MicroPython, you can read more about them in the [compatible boards section](#compatible-boards).
17+
18+
Arduino also supports [OpenMV's branch of MicroPython](https://github.com/openmv/micropython), and through the [OpenMV IDE](https://openmv.io/pages/download) you can install MicroPython, connect/disconnect your board and upload your scripts.
1619

1720
![Arduino boards officially supporting MicroPython.](assets/micropython-supported-boards.png)
1821

@@ -37,11 +40,22 @@ As MicroPython is already running on the board, we don't need to compile and upl
3740

3841
***When installing MicroPython on a board, it can only run MicroPython scripts, until we "uninstall" it. To put the board back in "normal mode" we need to reset the bootloader, which is a unique process for each board. These instructions are available in the [compatible boards](#micropython-compatible-boards) section in this article. Basically, you have to put the board in bootloader mode and upload any .ino sketch. ***
3942

43+
## Arduino Lab for MicroPython
44+
45+
![Arduino Lab for MicroPython Editor](assets/mpylabs-ss.png)
46+
47+
The [Arduino Lab for MicroPython](https://labs.arduino.cc/en/labs/micropython) is a lightweight editor designed for simple interaction between your computer and board. With it, you can select your port, load scripts, and use the REPL shell and more.
48+
49+
- [Download Arduino Lab for MicroPython Editor](https://labs.arduino.cc/en/labs/micropython).
50+
- [MicroPython Firmware downloads page](/micropython).
51+
4052
## OpenMV Editor
4153

42-
The Arduino IDE does not yet support Python. Instead, we can use [OpenMV](https://openmv.io/), a platform that supports programming Arduino boards with MicroPython. Through the OpenMV editor, we can install MicroPython, and upload scripts directly to the board. There's also a number of examples available directly in the editor.
54+
[OpenMV](https://openmv.io/) is a platform that supports programming Arduino boards using a fork of MicroPython. Through the OpenMV editor, we can install this fork, and upload scripts directly to the board. There's also a number of examples available directly in the editor.
4355

44-
![The OpenMV editor.](assets/placeholder-openmv.png)
56+
OpenMV is a great platform for computer vision and machine learning projects.
57+
58+
![The OpenMV editor.](assets/openmv-ss.png)
4559

4660
### OpenMV Examples
4761

@@ -64,9 +78,10 @@ All of above are also compatible with the **OpenMV IDE.**
6478

6579
![The Nano 33 BLE](assets/hero-nano-ble.png)
6680

67-
If you need help getting started with MicroPython on the **Nano 33 BLE** board, you can check out the tutorial below:
81+
If you need help getting started with MicroPython on the **Nano 33 BLE** board, you can check out the tutorials below:
6882

69-
- [Getting started with MicroPython with Nano 33 BLE](/tutorials/nano-33-ble/getting-started-omv) (setting up your environment).
83+
- [Install MicroPython on your Nano BLE](/tutorials/nano-33-ble-sense/micropython-installation#arduino-nano-33-ble).
84+
- [Getting started with OpenMV and Nano 33 BLE](/tutorials/nano-33-ble/getting-started-omv)
7085
- [Nano 33 BLE Python API guide](/tutorials/nano-33-ble/ble-python-api) (a collection of useful scripts).
7186

7287
***To reset the bootloader on the Nano 33 BLE board, double tap the reset button quickly. This will reset your board to factory setting.***
@@ -77,7 +92,8 @@ If you need help getting started with MicroPython on the **Nano 33 BLE** board,
7792

7893
If you need help getting started with MicroPython on the **Nano 33 BLE Sense** board, you can check out the tutorials below:
7994

80-
- [Getting started with MicroPython with Nano 33 BLE Sense](/tutorials/nano-33-ble-sense/getting-started-omv) (setting up your environment).
95+
- [Install MicroPython on your Nano BLE Sense](/tutorials/nano-33-ble-sense/micropython-installation#arduino-nano-33-ble).
96+
- [Getting started with OpenMV and Nano 33 BLE Sense](/tutorials/nano-33-ble-sense/getting-started-omv)
8197
- [Nano 33 BLE Sense Python guide](/tutorials/nano-33-ble-sense/ble-sense-python-api) (a collection of useful scripts).
8298

8399
***To reset the bootloader on the Nano 33 BLE Sense board, double tap the reset button quickly. This will reset your board to factory setting.***
@@ -88,8 +104,10 @@ If you need help getting started with MicroPython on the **Nano 33 BLE Sense** b
88104

89105
If you need help getting started with MicroPython on the **Nano RP2040 Connect** board, you can check out the tutorials below:
90106

91-
- [Getting Started with OpenMV and MicroPython on Nano RP2040 Connect](/tutorials/nano-rp2040-connect/rp2040-openmv-setup)
107+
- [Install MicroPython on your Nano RP2040 Connect](/tutorials/nano-rp2040-connect/micropython-installation#arduino-nano-rp2040-connect)
92108
- [Nano RP2040 Connect Python guide](/tutorials/nano-rp2040-connect/rp2040-python-api)
109+
- [Getting Started with OpenMV and MicroPython on Nano RP2040 Connect](/tutorials/nano-rp2040-connect/rp2040-openmv-setup)
110+
93111

94112
***To reset the bootloader, you will need to short to connect a jumper wire between the REC and GND pin, and press the reset button. More detailed instructions are available in the [Nano RP2040 Connect technical reference](/tutorials/nano-rp2040-connect/rp2040-01-technical-reference#board-not-detected).***
95113

@@ -99,6 +117,7 @@ If you need help getting started with MicroPython on the **Nano RP2040 Connect**
99117

100118
If you need help getting started with MicroPython on the **Portenta H7** board, you can check out the tutorial below:
101119

120+
- [Install MicroPython on Portenta H7](/tutorials/portenta-h7/micropython-installation#arduino-portenta-h7).
102121
- [Getting Started with OpenMV and MicroPython on Portenta H7](https://docs.arduino.cc/tutorials/portenta-h7/por-openmv-gs)
103122

104123
## Learn Python
@@ -122,7 +141,7 @@ This means it's time to learn the **Python** language, which there is a lot of r
122141

123142
Visit the [MicroPython documentation](https://docs.micropython.org/en/latest/) for an understanding on how Python runs on microcontrollers.
124143

125-
***Note that many examples will not work directly with Arduino boards, but will provide an understanding of how Python can run on a microcontroller.***
144+
***Note that many examples in the MicroPython Docs will not work directly with Arduino boards, but will provide an understanding of how Python can run on your board.***
126145

127146
## API
128147

@@ -166,7 +185,7 @@ while True:
166185
time.sleep(1)
167186
```
168187

169-
### For loop
188+
### For Loop
170189

171190
Simple use of a for loop and functions. This script counts to 10, and then back to 0.
172191

Loading
Loading

0 commit comments

Comments
 (0)