Feel free to edit this page!
The M5Stack modules are built around the popular ESP32 microcontroller. They can be programmed in C++ using either the Arduino ecosystem (Arduino IDE) or Platform.io (VScode IDE) (or both in parallel). Alternatively, you can run a MicroPython interpreter on the M5Stack. MicroPython is also used as foundation for M5Stack's custom block-based visual programming framework UIFlow.
Hint: If you want to work on a project both using PlatformIO/VScode and the Arduino IDE, just use a main.cpp
file that contains #include <Arduino.h>
and setup()/loop
functions. Then add an empty foobar.ino
file into the project folder. The Arduino IDE accepts the .ino
file and simply compiles it together with all .cpp
files in the same folder (i.e., our main.cpp
) into a binary.
setup()
function.pip3 install esptool
This is the commandline tool which will be used for flashing. Both Python 2 and Python 3 versions should be ok.python3 -m esptool --baud 115200 --after no_reset erase_flash
python3 -m esptool --baud 115200 write_flash --flash_mode dio --flash_freq 80m --flash_size detect 0x1000 m5stack-psram-20180516-v0.4.0.bin
pip3 install adafruit-ampy
ampy --port /dev/cu.SLAB_USBtoUART put main.py main.py
source: https://appelsiini.net/2018/m5stack-esp32-firmware-cli/
See also: Alternative MicroPython firmware, M5Stack forum post: "Where to get basic (offline?) MicroPython firmware with lcd module support?"
UIFlow/M5Flow is a web-based IDE including a block-based programming language (based on Blockly) that is “compiled” to Python code and uploaded to an M5Stack module via the internet. There is an additional tool, M5BlockMaker, that can be used to develop custom blocks.
http://192.168.4.1
* go to http://flow.m5stack.com, enter the API key displayed on the M5Stack in order to connect it to the web IDE, and select the correct device (core/stick).
UIFlow requires a special firmware to be flashed onto the M5Stack module (Howto).
If you don't want to install the flashing tools, you can always ask us to re-flash the UIFlow firmware onto the M5Stack module.