M5Stack Forums, Videos and News.
Project HUB
More >>
A smart lighting system using W5500-EVB-Pico, Adafruit IO, and a PIR sensor. Circuitpython used.
Record my utilization of the mycobot280 M5Stack with ROS and MoveIt for programming, enabling path planning and obstacle avoidance.
Create your handheld gaming console using an Arduino Nano ESP32 and play Doom on the go.
More >>
New Arrivals- Atomic RS485 Base
New arrivals- 8Servos Unit
How to use USB port execute code on UIFlow 2.0
M5Stack News

Source: Svet Kompjutera (World of Computers)

Author: Dejan Petrovic

Link: M5Stack Core2 - Slaganje cigala i u mreži - SVET KOMPJUTERA (sk.rs)

Translate: M5Stack

 M5Stack is a company engaged in the production of hardware and software in the field of the Internet of Things (IoT). Their most famous product series is the stackable devices, hence the name. These devices can be microcontroller boards, development boards with screens, sensors, and more. There are various solutions available with different sizes, power, and hardware functionalities (Stack, Stick, Atom). The common feature is that they can be stacked together. This allows for ready-made solutions suitable for different needs and projects. We obtained the Core2 from M5Stack, which is a standalone and complete device.


One impressive aspect of Core2 is the availability and completeness of the hardware and software created by M5Stack... 

The Core2 is a compact device, measuring approximately 54x54x16 millimeters and enclosed in a white plastic casing. At the heart of the system lies the Espresif ESP32-D0WDQ6-V3 microcontroller. This dual-core 32-bit Xtensa LX6 chip operates at a frequency of 240 megahertz. M5Stack has added additional memory, including 16 megabytes of flash memory and 8 megabytes of PSRAM.

Unlike typical ESP32 modules found in the market (with onboard antennas), the Core2 doesn't follow that form factor. Instead, it provides an interface for an external antenna, allowing the manufacturer to have flexibility in antenna design. In this case, M5Sttack have opted for a 3D antenna, which is clearly a superior solution compared to a printed antenna. The ESP32 itself can connect to Wi-Fi and Bluetooth, although only one radio can be used at a time, with both sharing the same antenna. 

Core2 utilizes a USB-C interface for programming and power supply, which uses the CH9102F UART for communication with a computer and is equipped with a circuit for automatically downloading user programs. There is also a JST connector on the board for the same purpose. It is worth noting that M5Stack can be stacked, and the USB interface can be extended using a cable. Core2 can be powered by a battery, and surprisingly, it is equipped with a 390 milliamp-hour lithium-ion battery integrated into the bottom gray casing cover. The AXP192 chip is responsible for battery management, and this programmable circuit is connected to the ESP32 chip via the I2C interface. The chip controls power consumption and notifies the status through the PWR LED. Additionally, it also allows for device shutdown through software. The SY7088 is used as a boost converter. There are two buttons on the casing, 'RST' and 'PWR', with the latter connected to the AXP192. Furthermore, the Core2 casing is secured with internal hex screws and comes with an accompanying wrench with a data cable.

Core2 comes with a rich set of features, and the bottom cover is labeled with tags. Despite being small, each aspect of the device is clearly marked, including pin layouts and other identifiers. If Core2 is used as a clock, it is equipped with the BM8563 real-time clock (RTC) chip, onnected to the ESP32 via the I2C interface. We haven't utilized the RTC functionality yet, but there are corresponding libraries available on the Arduino IDE. Additionally, there is a microSD card slot, a vibration motor, and a speaker. The speaker faces the NS4168 I2S audio driver, providing excellent sound effects. The motor is directly connected to the AXP192. In Core2, the AXP192 plays a more important role, with many EN pins connected to it. This applies to the NS4168, BM8563, and even the LED.

However, the most notable feature is undoubtedly the 2-inch color screen with an integrated capacitive touchscreen (FT6336U). The screen has a resolution of 320x240 pixels and is driven by the ILI9342C driver. We are very pleased with the screen display; although it may not compare to smartphone screens, it is excellent for the purpose of a development board. If you find that the screen calibration and touch sensitivity are not satisfactory, you can download M5TOOL from the official DOCS page to upgrade the firmware. There are three clearly marked touch areas below the screen that can be programmed as needed.

Core2 is equipped with two expansion ports. The smaller four-pin Grove on the side is actually an I2C interface. Grove is a variant of Seeedstudio, similar to QWIIC, STEMMA, easyC, and others. However, unlike other listed variants, M5Stack's Grove has a wider pin spacing and is not compatible with other brands. At the bottom, there is a large 2x15 female header, which is connected to the unused pins of the ESP32. All labels are clearly printed on the bottom, and Core2 can be powered using regulated voltage through the 5V pin. This header can also be used to stack additional modules, and these modules can have any functionality. Core2 comes with a smaller base (M5GOBottom2) that can fit perfectly into the casing and act as a cover for the header. It features the MPU6886 and SPM1423 chips. The former is a motion-tracking sensor that combines a three-axis accelerometer and gyroscope, while the latter is a microphone. 

All M5Stack development boards are available in the ESP32 package in the Arduino IDE. For full hardware functionality, M5Stack provides corresponding Arduino libraries. However, M5Stack recommends adding special support through the JSON software package:


which helps reduce the hassle when programming and interacting with the internal hardware of Core2. The same approach applies to libraries added for the specific hardware used, such as M5Core2, through "Include Library -> Manage Libraries...". The list of libraries to be installed is quite long. Hardware management is divided into five sections: AXP192, CORE2 LCD, Button, TOUCH, and RTC, each with its own corresponding and well-documented library available. For example, printing "Hello World" typically requires only a few lines of code:

#include <M5Core2.h>


Void setup(){




M5.Lcd.print("Hello World!");




Void loop(){



The graphics API does not adhere to the familiar AdafruitGFX, but it has very detailed documentation and allows for creative freedom. It enables drawing various geometric shapes and also supports loading bitmaps from the microSD card. The documentation page (DOCS) is highly detailed, and we really have no complaints in this regard.

Arduino is not the only starting point for learning programming with this device. M5Stack offers UIFlow, MicroPython, and .NET nanoFramework as alternative options. MicroPython does not have a dedicated compiler but can utilize the general compiler of the ESP32. We are not familiar with this approach and have not had any experience with it. However, the most interesting option is undoubtedly UIFlow (www.flow.m5stack.com). This "programming language" is actually a visual "blocks" language. If you recall our discussion about BBC micro:bit and MakeCode, there are many similarities here. It's similar to MIT App Inventor as well. It's a visual block-based approach but based on Python. Above the toolbar, besides the project name, there is a tab to switch between the "block world" and the "Python world" editors. Before any programming, you need to download the M5Burner tool, which is used to load the necessary firmware and the interface for interacting with the "blocks" into the Core2, as well as local network data. We know that these parameters are not cleared when loading user programs. In addition to input parameters, M5Burner also displays the API key, which is important for establishing a connection between UIFlow and Core2.

Let's continue discussing UIFlow. The top toolbar of UIFlow contains various tools and shortcuts. Here, you can open new projects, save existing projects, and more. However, the most important option is "Settings," where you can select the device, port, and enter the API key. After that, you can choose whether to connect Core2 to the computer via a data cable or program it without connecting the data cable. Yes, Core2 supports wireless programming (Over the Air, OTA), similar to MikroElektronika's CodeGrip (although CodeGrip is actually something else). After opening Core2, three options are displayed on the screen: App, UIFlow, and Setup. We are interested in the second option, where we can choose the programming mode, either USB or Wi-Fi. We choose Wi-Fi and disconnect the USB cable from Core2. There is a detailed tutorial on the assembly of "blocks" on the DOCS page, so we won't go into detail here. The UIFlow interface consists of a left section, which can be called a graphical drag-and-drop screen designer, and the middle section is a strip of basic blocks that we can simply drag into the editor on the right. Once the "construction" is complete, the "modules" are loaded onto Core2 almost instantly (in less than a second) by clicking the "Run" button. 

We are absolutely thrilled with the availability of M5Stack in terms of hardware and software. The efforts put into it have yielded significant results. It is fascinating, especially with Core2, as it can be used directly as a finished product without any modifications. For instance, it can display data from a server and more, without even requiring a case. It is evident that it can be flexibly stacked according to needs. What's even more interesting is that it can be programmed anywhere as long as it is connected to the internet. We highly recommend it without a doubt.


Source: Svet Kompjutera (World of Computers)

Author: Dejan Petrovic

Link: https://www.sk.rs/arhiva/clanak/32212/m5stack-atom-s3-atom-je-zapravo-mali

Translate: M5Stack

Last December, we covered some new products from M5Stack, one of which is the Atom S3. We got our hands on this compact device from M5Stack, and now let's write a few sentences about its introduction. In our article about M5Stack Core2, we mentioned that M5Stack's concept is to combine different microcontrollers, screens, sensors, and actuators through stacking to create a variety of completely different devices. Atom S3 also follows this principle.

esp32 device

This is an incredibly small device, measuring 24×24×13 mm and weighing only about 6.8 g. Without requiring any additional components, it can be used as a stand-alone unit (node) or as part of a larger system to perform various tasks. In fact, Atom S3 provides almost all the necessary functions to act as a control device. The core of this tiny Atom S3 is the ESP32-S3FN8 microcontroller from Espressif. We have previously written about the ESP32-S3, which features a dual-core Xtensa 32-bit LX7 processor with a clock frequency of 240 MHz, 384 kilobytes of ROM, 512 kilobytes of SRAM, and 16 kilobytes of RTC SRAM. Atom S3 sacrifices additional flash memory storage due to its size. With a 3D metal antenna, the Atom S3 can connect to a 2.4 GHz local area network, supporting the 802.11b/g/n standard with data transfer rates of up to 150 Mbps, and supports Station, SoftAP and Station+SoftAP modes.. The Bluetooth version of ESP32S3 chip is 5.0 and it also supports Bluetooth Mesh, making it convenient to communicate with other devices in the network. The data transfer rate of Bluetooth is also noteworthy, reaching up to 24 Mbps per second.

Despite its small size, Atom S3 offers quite a few peripheral devices. The first thing that catches the eye is a compact 0.85-inch LCD screen with a resolution of 128×128 pixels, which is connected to the ESP32-S3 via the SPI interface. The model of this screen is N085-1212TBWIG06-C08. We don't have much data about it, but we can confirm that the display quality is excellent. In fact, ATOM S3 consists of two PCB boards, forming a sandwich structure, with the smaller PCB located below the screen, carrying the MPU6886, which is a high-performance six-axis MEMS motion tracking device and a 6DOF (Six Degrees of Freedom) device. The MPU6886 combines a three-axis accelerometer and gyroscope with high precision and sensitivity. It is connected to the ESP32-S3 via I2C. Previously, we obtained a small add-on board called M5GOBottom2 with an MPU6886 together with the M5Stack Core2 kit. Inside ATOM S3, there is also a green LED (WS2812 RGB LED) and an IR LED (infrared emitter/transmitter).

Atom S3 can be connected to a computer using a USB-C connector, and it's worth noting that the ESP32-S3 has a direct USB port (CDC function) for programming through that port. AtomS3 is usually powered via USB-C (but can also be powered through the header connector), and the voltage regulation is handled by SY8089, which is a step-down regulator that allows an input voltage range of 3.3V to 5V and provides a maximum current output of 500mA.

In the Atom series of products, the bottom-exposed pins can be defined for functions such as I2C, SPI, UART, GPIO, and ADC. There is an expansion header connector called ATOM-MATE, which allows users to connect to other sensors, actuators, or external devices to expand the usage range by accessing the pins on the bottom of Atom. Additionally, Atom S3 has a programmable button and a programmable RGB LED that can be used for user interaction and status indication.

esp32s3 UIFlow

Atom S3 supports Arduino IDE, MicroPython, and UIFlow, which allows developers to write applications using familiar development environments and languages and leverage rich libraries and resources. M5Stack provides extensive documentation, sample code, and tutorials to help users get started and develop their own projects.


Source: Svet Kompjutera (World of Computers)

Author: Dejan Petrovic

Link: https://www.sk.rs/arhiva/clanak/32306/m5stack-cores3-trece-jezgro-od-sunca

Translate: M5Stack

CoreS3 is the third-generation flagship product of the Core series controller launched by M5Stack. Compared to the previous Core2, CoreS3 brings more innovation and functionality. Through the continuous release of new products, M5Stack has proven that its products are not only suitable for electronic enthusiasts' projects but also widely applicable to industrial and commercial projects, providing an excellent foundation for training future engineers. CoreS3 is a strong testament to this. So what are the new features in CoreS3 compared to Core2, which was released two years ago?


If we compare them side by side, we will find that the dimensions of Core2 and CoreS3 are basically the same. In fact, if we ignore the color, their casings are identical. Of course, the difference lies in the hardware configuration, although there is some overlap in certain details.  Similar to the chip used in the Atom S3, which we have already mentioned several times, the M5Stack CoreS3 uses the ESP32 S3, a microcontroller from Espressif Systems.

Let's briefly review the basic features of the ESP32 S3. ESP32 S3 is a dual-core microcontroller that utilizes the Xtensa® dual-core 32-bit LX7 processor and supports 2.4GHz WiFi and Bluetooth functionalities. It offers a maximum of 16MB of optional Flash and a maximum of 8MB of optional PSRAM, sufficient to meet the requirements of any task. Users can transfer programs to the CoreS3 via the USB-C interface, which also supports OTG and CDC functionality. The USB-C interface can be used for both power and battery charging.

CoreS3 still features a 2-inch capacitive IPS screen with a resolution of 320x240 pixels. The glass screen is scratch-resistant and is equipped with an ILI9342C driver. The touch function is carried by the FT6336U, which is the same as Core2. While there isn't much difference in the screen between CoreS3 and Core2, there are significant differences in the functionality underneath the screen. Core2 only had three touch-sensitive areas underneath the screen, whereas CoreS3 is equipped with two microphones, light and proximity sensors, and a camera. In terms of audio, both devices are I2S devices with 1W power speakers, but CoreS3 has an ES7210 as a 24-bit audio ADC and an AW88298 audio amplifier. For the light and proximity sensor, CoreS3 has chosen Liteon's LTR553ALSJ proximity sensor, which can measure a range from 0.01 lux to 64K lux with a 16-bit resolution. The proximity sensor consists of a standard LED (emitter and receiver), and users can determine the distance using an 11-bit resolution. Lastly, CoreS3 also features a GC0308 camera with a 300,000-pixel sensor. The camera sensor has a 10-bit ADC resolution and supports VGA video at a maximum of 30 frames per second.

The CoreS3's metal casing hides even more interesting sensors. For accelerometer and gyroscope sensing, it features the Bosch BMI270. The BMI270 offers a 16-bit resolution for six-axis sensing. If you thought there should be a compass sensor next to such a sensor, M5Stack has already taken the lead. On the CoreS3, it also houses the Bosch BMM150, a three-axis magnetometer sensor with a resolution of 0.3 μT. But that's not all. Next is the BM8563 RTC, capable of displaying seconds, minutes, hours, days, months, and years. It supports both 24-hour and 12-hour formats, as well as leap years. For each mentioned integrated circuit, available interrupt pins are utilized. Specifically, for the RTC, the CoreS3 can be programmed to set an alarm, making use of this functionality.

On the side of the device, CoreS3 retains the microSD card slot, reset button, and power button. Next to the USB-C interface is the I2C PORT.A. CoreS3’s bottom provides access to a 2x15 pin header and a JST battery connector. It is worth mentioning that the AXP2101 is used as the battery management chip, which is a high-performance power management chip that utilizes advanced integrated circuit technology to provide comprehensive power management functions. On the bottom of CoreS3's metal casing, there are very small but clearly visible markings that show the internal connections of the ESP32 S3 with the entire hardware. Due to the similar pin layout and compatibility with the JST connector, the Core3's Din Base is compatible with Core2, allowing for full hardware support from Core2.

DIN Base is the default base of Core S3. This base is designed for mounting Core S3 on a DIN rail or a flat surface and comes with necessary plastic clips. The base provides additional expansion capabilities internally. The focus of the DIN Base is power management, allowing Core S3 to be powered by a voltage of 9 to 24 volts through a DC connector using the SY8303 voltage regulator. The 500mAh lithium-ion battery is located beneath the prototype PCB board and is managed together with the TP4057 integrated circuit. The power supplied to Core S3 from the base can be turned off using a small switch. The PCB board itself is a prototype board with plated through holes (PTH) that allow for the addition of hardware according to the user's needs. The side of the base casing has holes for adding additional openings for connecting probes, connectors, and so on. There are also two additional connectors, PORT.B and PORT.C, with pin mappings that are compatible with all Core series devices. Yes, the DIN Base can also be used with previous Core series hosts (all M5Stack components are mutually compatible). We also noticed three holes that allow the base to be used with the LEGO system, which has great potential among children.

The Core series controllers have multiple bases to choose from. Some of these modules are terminal bases, which are dedicated to forming complete devices with the Core, while other bases are universal, allowing them to be used with any controller from the Core series. We would like to specifically introduce the following:

AC Power Base: It allows the device to be directly connected to an AC power source.

2Relay 13.2 Module: It utilizes an STM32F030 microcontroller to provide two relays that can be controlled by the controller.

BaseX (EV3 Motor):  It can connect RJ11 LEGO motors and two servo motors, making it ideal for robotics projects, and can also be equipped with an additional microphone.

LAN Base: Based on the W5500, it allows the host to be connected to a local network via an Ethernet cable, enabling it to be used as a PLC device. This base also comes with RS485 and RS232 adapter boards.

These are several available types of bases, each with different functionalities and features to meet various application needs.

What about the software aspect?

The Core S3 comes with pre-installed firmware that allows for the use of all hardware features through eight built-in applications. These applications include scanning for available local networks, listing the contents of a microSD card, checking the sensitivity of the touch screen, and scanning I2C lines to test all sensors and functionalities on the device. The most notable application is the camera app, which combines the camera function with light and distance sensors. Considering the capabilities of the camera and screen, the camera display on the screen is quite impressive, and we are satisfied with its performance. Two bar graphs on the right side of the screen display the light intensity and proximity, such as the proximity of a finger.


M5Stack has prepared some new features to support the Core S3, and one of them is EasyLoader. It is a small tool used for quickly erasing or writing firmware to the Core S3. Assuming the user program has already been written in an editor, it only requires selecting the port and baud rate values.

M5Stack controllers support large software packages for the Arduino IDE (which takes a long time to download from the internet), and M5Stack also provides support for these controllers. Regarding the added support, we have mentioned it in a previous article about the Core 2. For this ESP32S3 device, the provided support includes some examples. However, in the custom library section, there is a large group of examples prefixed with "M5," most of which are grouped according to the available bases for each Core. Each group provides several examples, resulting in a total count close to three digits, so listing all of them wouldn't make sense. Additional examples not included in the support package can be downloaded from the official GitHub page. These examples are up-to-date and are expected to appear in future updates of the Arduino IDE support. Overall, there are so many examples available for each feature of the Core that there are hardly any scenarios left uncovered.

UIFlow 2, which supports all the latest devices from M5Stack, including the Core S3, has been introduced in previous articles about M5Stack devices. This "blocky" editor consists of three parts, with the ability to hide some parts for clarity when needed. The use of blocks is increasingly popular and may be the best choice for inexperienced users, especially children, as it guides them into the world of electronics and programming. When the curtain is lifted, Python code is revealed beneath the blocks. The third part of the editor is the Python editor itself, allowing complete device programming through Python without the need for block programming. The Python structure used here is largely similar to programming languages used for Arduino platform code written in C/C++. The M5Burner mentioned earlier can also be used here, but it does not support UIFlow, which means that programming through the M5Stack system without a wired connection to a computer is not possible. The tool provides some examples, including the factory examples that come with the device.

Considering the features offered by the Core S3, its price is reasonable. Additionally, by adding modules, it can provide even more functionalities to meet different needs and expectations. Imagine the power of hardware with a screen and direct data input capabilities, along with additional built-in sensors and countless sensors that can be added through ports. It is evident that the possibilities for combinations are limitless, and the Core S3 can serve as a control unit for a larger system or as the central unit of its own system. It can be used in conjunction with the LEGO system, which is an additional advantage. If you want to introduce children to electronics and programming through games and building with LEGO blocks, we believe this could be the right choice. We wholeheartedly recommend it.


The ESP32 microcontroller is widely used in IoT projects and offers a flexible and powerful platform for development. Sometimes, people may need to erase the flash memory of their esp32 devices, such as removing existing firmware or preparing the device for new code.

When we are developing our project, we may store some data in the flash, such as when we use the NVS functionality to store information in the flash, but when we need to download new firmware to test this device as a new one, this previous information is not overwritten. So we need to erase the flash completely and then download the new firmware.

In this article, we will lead to erase ESP32 flash memory and provide step-by-step instructions. Here, we introduce a tool called esptool.   

To erase the flash memory of an ESP32 device, there are currently three common methods available:

Esptool.py, a command line tool (suitable for MacOS and Linux systems).

Esptool-js, a web-based tool (suitable for MacOS, Linux and Windows systems).

Flash Download Tools, a GUI-based tool based on Esptool (suitable for Windows system).

Next, we will provide detailed instructions for these three tools. In this article, we will use the M5Stack Core2 as an example. The M5Stack Core2 is a popular ESP32-based controller that features a 2.0-inch integrated capacitive touch screen and a wide range of built-in functions.



Esptool.py is a Python-based, open-source, platform-independent utility for communicating with the ROM boot loader in Espressif SoCs. 

It can do a number of things, for example:

  •    Read, write, erase, and verify binary data stored in flash.
  •    Read chip features and other related data such as MAC address or flash chip ID.
  •    Read and write the one-time-programmable efuses.
  •    Prepare binary executable images ready for flashing.
  •    Analyze, assemble, and merge binary images.

How to use Esptool.py to erase the Flash chip in M5Core2

1). Install esptool.

Open the Terminal application and type the following installation command at the command line.

pip install esptool                                                                                                   

 After the installation, we can test it with the following command. If it returns the correct version, it indicates a successful installation.

esptool version                                                                                                         


2). Get the PORT number of M5Core2.

Use the following command to find out the USB serial port number of the M5Core2. In this step, please ensure that M5Core2 is the only device connected to your computer.

ls /dev/cu.usb*                                                                                                        


*The serial port number in the image above is for the MacOS system. If your computer is running a different operating system, you will need to replace the serial port number with the appropriate one.

3). Execute the erase command to erase the Flash chip in M5Core2.

esptool.py --chip auto -p /dev/cu.usbserial-56D40013521 erase_flash             

The Chip Auto automatically detects the chip type, making it easy to use. When you see the message "Chip erase completed successfully" in the terminal, it indicates a successful erase. The time required for erasing may vary depending on the actual capacity of the flash chip, so please be patient and wait a while. And now we have successfully erased the flash chip in M5Core2.



Esptool-js is a Javascript implementation of esptool, a serial flasher utility for Espressif chips. esptool-js is based on Web Serial API and works in Google Chrome and Microsoft Edge version 89 or later browsers.

Unlike the Python-based esptool, esptool-js doesn't implement generation of binary images out of ELF files.

In the following steps, we'll erase the ESP32 flash chip using a web-based demo provided by Espressif Systems..


How to use Esptool-js to erase the Flash chip of M5Core2

1). Open the following web link:

ESP Tool (espressif.github.io)


2). Connect M5Core2 with USB cable

Select a lower baud rate and then click the Connect button.

Select the serial port number of M5Core2 in the pop-up window.

3). Erase

Once connected, the next page will show the correct model and version of the M5Core2's ESP32 chip.

ESP32 erase flash

Click the Erase Flash button to start erasing the Flash chip!

When "Chip erase completed successfully ..." is displayed, it means that the M5Core2 flash chip has been successfully erased. As mentioned earlier, the erasing process may take some time due to the different actual capacities of the flash chip. Please be patient and wait a while. In addition, this website is not limited to the erase function, but also allows you to burn firmware. You can explore this functionality separately, as it is beyond the scope of this discussion.

Now, we have successfully used Esptool-js to erase the Flash chip of M5Core2.

Next, we will present the final method.

Flash Download Tools


Flash Download Tools is a GUI tool designed for the Windows platform. This tool can be used to program not only ESP32 series chips but also chips such as ESP8266 and ESP8285. It also provides batch programming for mass production. In this article, we will only discuss how to erase the flash chip.

To get started, you will need to download the tool from the following link:Tools | Espressif Systems

ESP32 Flash download tool

How to use Flash Download Tools to erase the Flash chip of M5Core2

1). We need to extract the downloaded files.

Once the extraction is complete, we will see the list of files shown in the image below.

This tool does not need to be installed. You can simply double-click it to run it. The documentation can be found in the red box.

2). View the serial port number in Device Manager

Connect M5Core2 to your computer using a USB cable, and then open Device Manager.

The serial port number here is COM28, the numbers may vary for different devices. Please check the actual serial port number on your computer. If you have multiple devices connected, please disconnect the others and ensure that only one M5Core2 device is connected to the computer.

 3). Open the tool and begin to erase!

Here we select "ESP32" for ChipType. If you are using a device with a different chip model, select the specific chip model accordingly. For WorkMode and LoadMode you can leave the default options. The tool interface will look like the image below.

At the bottom right, select the serial port number we checked in step two from the COM drop-down menu. If you have more than one device connected, make sure you do not select the wrong one to avoid accidentally erasing another device's flash or causing an error. Once you have made your selection, click the ERASE button to start the erasing process. Wait a while and when you see "FINISH" it means that the flash chip has been successfully erased.

Congratulations! You have successfully used Flash Download Tools to erase the Flash chip in M5Core2.


In this tutorial, using M5Core2 as an example, we have presented three methods for erasing the ESP32 flash chip. Each method can be used and you can choose the one that suits you best.


We often come across many excellent IoT projects that utilize ESP32 and Arduino. These two platforms clearly hold significant importance. So, what are they, and how can we utilize them together?

Introducing ESP32

ESP32 is a powerful microcontroller module developed by Espressif Systems, which comes with integrated Wi-Fi and Bluetooth connectivity for a wide range of applications, and highly integrating with in-built antenna switches, RF balun, power amplifier, low-noise receive amplifier, filters, and power management modules. It can interface with other systems to provide Wi-Fi and Bluetooth functionality through its SPI / SDIO or I2C / UART interfaces. ESP32 is widely used in mobile devices, wearable electronics and IoT applications.

M5Stack is a renowned company that specializes in providing hardware and software for rapid prototyping and IoT applications. M5Stack products are widely recognized for their integration, simplicity, and versatility, allowing users to stack or connect different modules/units together to build customized and scalable solutions. These modules cover a wide range of functionalities, including displays, sensors, communication interfaces, input devices, and more. By combining these modules, users can quickly create prototypes or even deploy complete IoT systems with minimal effort.

M5Stack Basic

One of the standout features is many M5Stack controllers built around the ESP32, leveraging its powerful processing capabilities, wireless connectivity, and extensive ecosystem. This compatibility grants users access to a vast library of code, examples, and community support, making development with M5Stack devices efficient and user-friendly.

Introducing Arduino

Arduino is an open-source electronics platform based on easy-to-use hardware and software. In the past years, countless of projects, ranging from simple household items to intricate scientific instruments, have used Arduino as their brain. Over time, Arduino has accumulated a vast user base worldwide including students, hobbyists, artists, programmers, and professionals, who  have gathered around this open-source platform to contribute an incredible amount of accessible knowledge that can be of great help to novices and experts alike. 

How to start

By leveraging the capabilities of both platforms, developers can create innovative IoT projects that benefit from the wireless connectivity of the ESP32 and the ease of development offered by Arduino. This combination opens up possibilities for remote monitoring, home automation systems, sensor networks, and much more.

In this tutorial, we will provide detailed steps and practical tips to help you correctly program  ESP32 (take M5Stack Basic for example) with Arduino IDE. Let's start!

1. Download the Arduino IDE

First, go to the Arduino website (https://www.arduino.cc/en/Main/Software) to download Arduino IDE that corresponds to your operating system.

 Download Arduino IDE

2. Preparing Arduino IDE

① Open the Arduino IDE and go to File -> Preferences -> Settings.

 Arduino IDE Perference

② Copy the following board manager URL and paste it into the Additional Board Manager URLs:


 Arduino URL-esp32

In this turial, we use M5Stack’s development boards,so in this step, just copy the following M5Stack board manager URL and paste it into the Additional Board Manager URLs:https://m5stack.oss-cn-shenzhen.aliyuncs.com/resource/arduino/package_m5stack_index.json 

Arduino Url-M5Stack

3.Select Tools -> Board -> Board Manager

ESP32 board in Arduino IDE

4. Installing ESP32 Board in Arduino IDE

In this tutorial, M5Stack's Basic Core is an example for leading. Thus, in this step, please enter "M5Stack" in the search field and click Install.

Installing M5Stack in Arduino IDE

And if you use other ESP32 controllers, please enter "ESP32" in the search field and click Install.

Installing esp32 in Arduino IDE

5. Selecting the Board

In this step, please select Tools -> Board -> M5Stack Arduino -> M5Stack-Core-ESP32. And currently, various M5Stack controller options are available for selection.

Selecting board in Arduino IDE

6. Programming ESP32 with Arduino IDE

Programming ESP32 with Arduino

Now, you can program the device using Arduino IDE and conveniently use it alongside hardware like Arduino Uno to unlock additional functionalities.  In this step, an example demo of Basic Core is uploaded, and you can see, the code is synchronized with the device. Now, you can start your own programming projects.

M5Stack Basic Core