STAMP PICO MicroPython Quick Start

This tutorial applies to STAMP-PICO

Burning tool.

Please click the button below to download the appropriate M5Burner firmware burning tool according to the operating system you are using. Open the application after decompression.

Pay attention:
MacOSAfter the user has completed the installation, please put the application into theApplication,As shown in the following figure。
LinuxFor users, please switch to the decompressed file path and run in the terminal../M5Burner, run the application。

ESP32 Downloader

You need to connect a downloader for STAMP-PIOC before burning. USB-TTL Recording board , And connect according to the screen printing of the board. The driver corresponding to the burning board is installed on the PC side.

The most convenient way is Choose the package version of STAMP-PICO with downloader , The wire sequence of the matching downloader is the same as that of STAMP-PICO, and it can be plugged and recorded directly without wiring. Click here to go to the following page to download the driver for the matching downloader CP210x & CH9102

Firmware burning

1.Double-click to open the Burner Burning tool①Select the corresponding device type in the left menuSTAMP,Select the firmware version you needSTAMP-PICO,Click the download button to download.

2.Then connect the downloader to the computer through the Type-C data cable, select the corresponding COM port, the baud rate can use the default configuration in M5Burner, click "Burn" to start burning, and fill inWIFI Configuration Information(This information will be used for devices to connect to the network, and in this tutorial, we will program in USB mode, which is not required.).

3.>When the burning log prompts Successfully, it means that the firmware has been burned.

Mode switching

If you keep pressing the button when the power is off and then power on, you will enter the mode switch state. In this state, LED and others will cycle between Green', Blue , YellowandPurple `, and different colors represent different modes. Release the button when LED switches the corresponding color to enter the corresponding mode. The detailed functional model is described below.

Green: Online programming mode, used to connect online version of UIFlow, You need to configure WIFI before you can connect。
Blue: Offline programming mode, connected via USB cable
Yellow: WIFI configuration mode, the device will automatically enable AP, and users can connect to the AP through the mobile device and access the 192.168.4.1 page to configure WIFI
Purple: APP mode. Default is to run the last downloaded program.

VSCode IDE Development.

Preparatory work.

Download. VSCode IDE: Click here to download
Install the M5Stack plug-in: Search the plug-in market for M5Stack and install the plug-in, as shown below.

Device offline programming mode (USB mode).

Keep pressing the button when the power is off, then connect to the PC and turn on the power, wait for the LED cycle to switch to blue and release, you can enter the USB programming mode.

Connect to Device.

Click the Add M5Stack option in the lower left corner and select the corresponding device port to complete the connection.

LED Control

After completing the above steps, let's implement a simple lighting case program, open the M5Stack file tree, and type in the following program. Click Run in M5stack to easily light a small yellow light. If the device is reset, click the refresh button to reopen the file tree.

Sample code.

from m5stack import *
from m5ui import *
from uiflow import *

rgb.setColorAll(0xffff33)
On This Page