NederlandsKlik deze knop voor de Nederlandstalige website

Programming the M5StickC with the Arduino IDE

The M5StickC is a mini version of the M5Stack and also based on the ESP32 microcontroller. It is a user-friendly and open-source IoT development board. The M5StickC programming is possible with UIFlow, MicroPython and of course the Arduino IDE. There are countless extensions available that are easy to connect to the Grove or HAT ports. In addition, you can of course also develop extensions for these standard connections.

Programming the M5StickC with the Arduino IDE - Close-up
Programming the M5StickC with the Arduino IDE – Close-up

Furthermore, the M5StickC is equipped with a battery with an associated charging circuit and a TFT color screen. All of this is in a compact and sturdy housing, making it an ideal platform for developing portable or “wearable” projects.

  • Based on the ESP32 microcontroller with 4 MByte Flash and WiFi / Bluetooth
  • TFT Color Screen 80×160 (0.96 “, Driver IC: ST7735S)
  • An LED (red)
  • 2 buttons
  • 6-axis motion sensor (SH200Q)
  • Real-time clock (BM8563)
  • Microphone
  • Infrared (IR) LED
  • 80 mAh Lipo battery with charging circuit
  • Expansion port (HAT)
  • Grove port
  • USB Type-C for programming, charging and power supply
M5StickC ESP32 PICO Color LCD Mini IoT Development Board
Tested and recommended by OneGuyOneBlog.com:

M5StickC ESP32 PICO Color LCD Mini IoT Development Board
Banggood.com

Programming M5StickC: prepare the Arduino IDE

To be able to program the M5StickC with the Arduino IDE you must first have installed the IDE together with the ESP32 core for the Arduino IDE. How you can do this is described in detail in the blog “ESP32 with Arduino IDE on Linux and Windows“. In short, it comes down to the following:

    1. Download and install the Arduino IDE. For more information, you can read the blogs “Installing the Arduino IDE on Windows 10” or “Install or upgrade to the latest Arduino IDE on Linux“.
    2. Start the IDE and open “Preferences” via menu File > Preferences.
    3. Enter this URL in the “Additional Board Manager URLs” field: https://dl.espressif.com/dl/package_esp32_index.json
    4. Open “Boards Manager” via menu Tools > Board > Board Manager and install the esp32 platform.

Install M5StickC Arduino libraries

To make programming easy, there are libraries and corresponding sample programs available that you can easily install via the IDE.

  1. Go to Sketch > Include library > Manage libraries
  2. Search for “M5StickC” and install the library
  3. When the installation is complete you can find the examples via the menu File > Examples, under “Examples for M5 Stick-C” and “Examples of Custom Libraries“.
M5StickC Libraries
M5StickC Libraries

Select the M5StickC

Finally, you must now choose the M5StickC as the board, with the correct settings.

  1. Go to menu Tools and choose “M5Stick-C” at “Board
  2. At “Upload Speed” choose “1500000
  3. At “Port” you select the correct COM port for the M5Stick-C.
M5StickC Board selection
M5StickC Board selection

No drivers are required for recent versions of Windows, Linux, and macOS. If the device is not recognized as a USB device, you can download the Virtual COM Port Drivers from FTDI here.

Programming M5StickC with the Arduino IDE

Everything is now ready to upload sketches to the Stick, for example, one of the sample sketches. Note that it is switched on, otherwise, the upload will not work. You can turn on the Stick by briefly pressing the power button. You can turn it off again by holding down the power button for longer.

You can address the various hardware components in your sketches by using the GPIOs below.

GPIO Function
00 MIC SCL / HAT
05 TFT_CS
09 IR transmitter
10 LED
13 TFT_CLK
15 TFT_MOSI
18 TFT_RST
23 TFT_DC
26 HAT
32 Grove SDA
33 Grove SCL
34 MIC SDA
36 HAT
37 Button A
39 Button B

More information

More information about the Stick can be found here:

To be continued

After this introduction, there will certainly be fun projects with the M5StickC on this blog. Have you made something nice yourself? Let us know in the comments below!

VNG Systems

M5StickC ESP32 PICO Color LCD Mini IoT Development Board
Tested and recommended by OneGuyOneBlog.com:

M5StickC ESP32 PICO Color LCD Mini IoT Development Board
Banggood.com

One Comment