How to Program ESP32 M5Stack StickC With Arduino IDE and Visuino

by RonFrtek in Circuits > Arduino

28613 Views, 17 Favorites, 0 Comments

How to Program ESP32 M5Stack StickC With Arduino IDE and Visuino

pasted image 0 (3).png
How to program ESP32 M5Stack StickC with Arduino IDE and Visuino

In this tutorial we will learn how to program ESP32 M5Stack StickC with Arduino IDE and Visuino.

Watch a demonstration video.

What You Will Need

41ueVuqJL6L._SX425_.jpg
VisuinoAdvrtisementM5Stack5.jpg
  1. M5StickC ESP32: you can get it here
  2. Visuino program: Download Visuino

Install Arduino IDE

pasted image 0 (4).png
arduino_cc_package_02.png
select_arduino_install_path.png
install_arduino_2.png

Open up your browser, and visit the official Arduino website https://www.arduino.cc/en/Main/Software

  1. click “Windows installer, for Windows XP and up” download Arduino IDE
  2. click JUST DOWNLOAD (or contribute if you like)
  3. Double click Arduino installer (It is easiest to keep the default selection throughout this process, including the installation path.)

In Arduino IDE: Install ESP32 Boards Manager

quick_start_arduino_win_01.png
quick_start_arduino_win_02.png
quick_start_arduino_win_03.png
quick_start_arduino_win_04.png
quick_start_arduino_win_05.png
  1. Open up the Arduino IDE, and navigate to File -> Preferences -> Settings
  2. Add the ESP32 Boards Manager URL
    Copy this link for the ESP32 Board Manager URL to Additional Boards Manager URLs ESP32 Boards Manager url: https://dl.espressif.com/dl/package_esp32_index.json

    Then hit OK
  3. Navigate to Tools -> Board: -> Boards Manager...
  4. Search ESP32 in Boards Manager window, find it and click Install

Install Visuino IDE

pasted image 0 (5).png
pasted image 0 (6).png
  1. Visit the download page , and download the latest version
  2. Extract and run the setup
  • The defaults should work fine
  • It will try to detect the location of the Arduino Library Path. Unless you changed it then it should be in C:\Users\[Your User Name]\Documents and the installer will detect it correctly.
  • Launch Visuino!

Connect M5Stick-C to Computer

2019-11-15_12-33-44.jpg
  1. Connect the M5Stick-C to your Windows computer via the included USB-C cable
    Windows should detect it and install the drivers automatically - you might need to reboot. If the driver installs correctly you will see it show up in Device Manager as a USB Serial Port

- Windows should detect it and install the drivers automatically - you might need to reboot. If the driver installs correctly you will see it show up in Device Manager as a USB Serial Port

- If you are on a version of Windows prior to Windows 10 then you may need to install a driver, although I recommend you upgrade! [Legacy Windows driver]

Start Visuino, and Select the M5 Stack Stick C Board Type

FTXCDGOK2OXCSUL.LARGE (1).jpg
2019-11-15_12-34-02.jpg

Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "M5 Stack Stick C" as shown on Picture 2

In Visuino Add Components and Connect Them

2019-11-15_12-33-23.jpg
pasted image 0 (7).png
pasted image 0 (8).png
  1. From the component palette select the Pulse Generator
  2. Connect the Pulse Generator to the LED pin

Generate, Compile, and Upload the Arduino Code

FN890ECK2OXCUK6.LARGE.jpg
2019-11-15_12-56-45.jpg
  1. Click the Arduino icon on the toolbar, this will generate code and open the Arduino IDE. The button next to it will compile and send the code straight to the device. You will want to open the IDE the first time to make sure the COM port is set correctly. After that the Arduino IDE will save your settings.
  2. Once in the Arduino IDE make sure your Board, Speed, and Port are set correctly. You will most likely need to set the COM port from the sub menu, but the others should be set automatically. If you have more than one COM port try removing your M5Stick, look and see which ports remain, then reattach the M5Stick and see which one returns. That is it’s COM port.
  3. Then click Upload. This will Verify (compile) and Upload.If you check your M5Stick-C you will see the upper left corner blinking.

Play

If you power the M5Sticks module, the LEDs should start to blink.

Congratulations! You have completed your M5Sticks project with Visuino. Also attached is the Visuino project, that I created for this Instructable. You can download and open it in Visuino: https://www.visuino.com

Troubleshooting

pasted image 0 (9).png

I tested and charged all of the M5Sticks already, but sometimes if the battery drains completely they don’t want to turn on and charge. These steps will restore normal operation (also tested these steps).

  • Short the BAT to GND.
  • Insert the USB cable.
  • After the screen is lit, stop shorting and USB continues to charge the device.

More Information

BIG THANK YOU!

All the credit for this tutorial goes to Jim McKeeth (Author of the original tutorial) and Boian Mitov (Developer of the Visuino).