🛠 Getting Started with M5Stack ToughC5
Objectives
This tutorial guides you through the first startup of the M5Stack ToughC5, a rugged IoT controller based on the ESP32-C5. You will learn to secure power, set up the development environment, and verify critical interfaces (display, connectivity).
Required Hardware
- M5Stack ToughC5 Kit (ESP32-C5HR8 module)
- High-quality USB Type-C cable (data and power)
- PC with Windows, macOS, or Linux
- Arduino IDE or PlatformIO
- CR2032 coin cell battery (for the RX8130CE RTC)
Steps
- Physical Preparation: Open the battery compartment. Insert the CR2032 battery into the RTC holder, positive side up. Close the PC+ABS housing to maintain weather resistance (IP65, not submersible).
- USB Connection: Connect the ToughC5 to your PC via the USB Type-C port. The power LED should light up. Note that the module also supports 6-24V input via RS485, but 5V USB is recommended for the first flash.
- IDE Configuration: In Arduino IDE, add the ESP32 board manager URL. Select the
M5Stack ToughC5board (orESP32-C5 Dev Moduleif the specific board is not yet available). Choose the correct COM port.
- Flash Test Program: Download an
Hello Worldexample adapted for ESP32-C5. Ensure M5Unified libraries are included to manage the IPS ILI9342C display (320x240 px) and buzzer. Compile and upload.
- Interface Verification: Once the code runs, the capacitive touchscreen should display the interface. Test Wi-Fi 6 (2.4/5 GHz band) and BLE 5.0 by scanning available networks via the serial monitor.
Verification
- The LCD screen turns on with high brightness (853 nits).
- The serial monitor displays startup logs without PSRAM errors (8 Mo Octal).
- Wi-Fi and BLE are detected in scan lists.
- The RTC clock retains time after USB disconnection.
Further Reading
Explore the 802.15.4 interface for Zigbee/Thread. Test the HY2.0-4P connectors to interface industrial sensors via RS485. Optimize sleep consumption (10.41 µA) for Li-ion 3.7V battery deployments.
Other tutorials for this board
Code examples for this board
toughc5_gpio_button_buzzer.inoC++ (Arduino)toughc5_wifi6_scanner.inoC++ (Arduino)toughc5_rtc_battery_log.inoC++ (Arduino)toughc5_ili9342c_touch_ui.inoC++ (Arduino)toughc5_rs485_modbus_master.inoC++ (Arduino)toughc5-rs485-modbus-master.inoArduino C++