M5Stack

Beginner

M5Stack Tab5 Arduino Tutorial: From Zero to Your First Upload

M5Stack Tab5 with Arduino IDE
Build This
Build time

Estimated cost

What You'll Need
  • M5Stack Tab5
  • USB cable
  • Computer (Windows, Mac or Linux)

Watch It In Action

This guide takes you from nothing to running your first program on the M5Stack Tab5 with Arduino IDE.

1. Install Arduino IDE

If you don't have it yet, download the latest version from arduino.cc and install it.

2. Add the M5Stack boards

  1. Go to File > Preferences.
  2. In Additional Board Manager URLs, add the M5Stack board package URL.
  3. Go to Tools > Board > Board Manager, search for M5Stack and install it.

3. Install the libraries

Go to Tools > Manage Libraries and install these two, accepting all dependencies when prompted:

  • M5Unified for core functionality
  • M5GFX for graphics and display control

4. Put the Tab5 in download mode

This is the critical step. Connect the Tab5 over USB, then press and hold the reset button for about 2 seconds, until the internal green LED blinks rapidly. Release the button, and the Tab5 is ready for new firmware.

5. Select the board and port

  1. Select M5Tab5 from the board list under M5Stack.
  2. Go to Tools > Port and pick your Tab5. It usually shows as a COM port on Windows or a USB port on Mac and Linux.

6. Run an example

  1. Go to File > Examples > M5GFX and open the bar graph example.
  2. Click the upload arrow.

Arduino compiles the code and uploads it. If everything worked, you'll see a bar graph animation on the screen. You've just programmed your Tab5.

If it doesn't work

  • Hold reset for the full 2 seconds to enter download mode.
  • Install all the library dependencies when prompted.
  • Check you selected the right board and port.
  • Check the USB cable connection.

What next

Try the other examples: IMU readings, microphone input, speaker output and touch. When you're ready for a real project, build my ambient day clock.