Stufin
Home Quick Cart Profile

M5Stack ATOM Matrix

Buy Now on Stufin

Microcontroller

ESP32 Dual-Core 32-bit LX6

Clock Speed

Up to 240 MHz

Wi-Fi2.4 GHz and 5 GHz dual-band

BLE

4.2 and 5.0 compatible

Flash Memory

4 MB

SRAM

520 KB

LCD Display

1.14 inches, 240x135 resolution

Operating Voltage

3.3V to 5V

Operating Temperature

-20C to 85C

Conclusion

The M5Stack ATOM Matrix is a powerful, versatile, and compact IoT development board that offers a unique combination of processing power, wireless connectivity, and modular design. Its small form factor, low power consumption, and ease of use make it an ideal platform for rapid prototyping and development of innovative IoT projects.

Pin Configuration

  • M5Stack ATOM Matrix Pinout Documentation
  • The M5Stack ATOM Matrix is a compact and powerful IoT development board featuring a 1.54" LED matrix display, aESP32 microcontroller, and a range of GPIO pins for connecting various peripherals. Here is a detailed breakdown of the pinout structure and functionality:
  • Top Pins
  • 1. GPIO 0 (IO0): This is a general-purpose input/output pin that can be used for digital input, output, or as an I2C SDA pin.
  • 2. GPIO 1 (IO1): This is a general-purpose input/output pin that can be used for digital input, output, or as an I2C SCL pin.
  • 3. GPIO 2 (IO2): This is a general-purpose input/output pin that can be used for digital input, output, or as a UART RX pin.
  • 4. GPIO 3 (IO3): This is a general-purpose input/output pin that can be used for digital input, output, or as a UART TX pin.
  • 5. GND: This is a ground pin, used to connect the board to ground potential.
  • Bottom Pins
  • 1. VIN: This is the input voltage pin, which can be used to power the board. The recommended input voltage is 5V.
  • 2. 3V3: This is a 3.3V power output pin, which can be used to power external components.
  • 3. GND: This is a ground pin, used to connect the board to ground potential.
  • 4. GPIO 15 (IO15): This is a general-purpose input/output pin that can be used for digital input, output, or as a SPI CS pin.
  • 5. GPIO 14 (IO14): This is a general-purpose input/output pin that can be used for digital input, output, or as a SPI CLK pin.
  • 6. GPIO 13 (IO13): This is a general-purpose input/output pin that can be used for digital input, output, or as a SPI MOSI pin.
  • 7. GPIO 12 (IO12): This is a general-purpose input/output pin that can be used for digital input, output, or as a SPI MISO pin.
  • I2C Pins
  • 1. SDA (GPIO 1): This is the I2C data pin, which can be used for I2C communication.
  • 2. SCL (GPIO 0): This is the I2C clock pin, which can be used for I2C communication.
  • UART Pins
  • 1. TX (GPIO 3): This is the UART transmit pin, which can be used for serial communication.
  • 2. RX (GPIO 2): This is the UART receive pin, which can be used for serial communication.
  • SPI Pins
  • 1. CS (GPIO 15): This is the SPI chip select pin, which can be used for SPI communication.
  • 2. CLK (GPIO 14): This is the SPI clock pin, which can be used for SPI communication.
  • 3. MOSI (GPIO 13): This is the SPI master out slave in pin, which can be used for SPI communication.
  • 4. MISO (GPIO 12): This is the SPI master in slave out pin, which can be used for SPI communication.
  • LED Matrix Pins
  • 1. VCC: This is the power pin for the LED matrix display.
  • 2. GND: This is the ground pin for the LED matrix display.
  • 3. SCK: This is the clock pin for the LED matrix display.
  • 4. SI: This is the data pin for the LED matrix display.
  • Note:
  • The M5Stack ATOM Matrix board has a modular design, and some pins may be used by peripherals or modules. Make sure to check the module documentation and board design before using any pins.
  • The pinout structure may be subject to change in future revisions of the board. Always check the official documentation and datasheets for the most up-to-date information.
  • By following this pinout documentation, you can effectively connect and utilize the various features and peripherals of the M5Stack ATOM Matrix board in your IoT projects.

Code Examples

M5Stack ATOM Matrix Documentation
Overview
The M5Stack ATOM Matrix is a compact, versatile IoT development board designed for prototyping and development of IoT projects. It features a powerful ESP32 microcontroller, Wi-Fi and Bluetooth connectivity, and a range of sensors and interfaces. The ATOM Matrix is ideal for projects requiring wireless connectivity, sensor integration, and compact size.
Hardware Specifications
Microcontroller: ESP32 Dual-Core 32-bit LX6 Microprocessor
 Wi-Fi: 802.11 b/g/n
 Bluetooth: BLE 4.2
 Sensors:
	+ Accelerometer (LIS3DHTR)
	+ Gyroscope (L3GD20H)
	+ Magnetometer (MAG3110)
	+ Ambient Light Sensor (BH1750)
	+ Temperature Sensor (TMP102)
 Interfaces:
	+ USB-C
	+ I2C
	+ I/O Pins (12x)
	+ LED (RGB)
Software Support
The M5Stack ATOM Matrix is compatible with a range of programming languages, including:
MicroPython
 C/C++
 Lua
 Arduino
Code Examples
### Example 1: Wi-Fi Connectivity and Temperature Sensor (MicroPython)
This example demonstrates how to connect to a Wi-Fi network and read temperature data from the on-board temperature sensor using MicroPython.
```python
import wifi
import machine
import time
# Initialize Wi-Fi
wifi.init()
# Connect to Wi-Fi network
wifi.connect('your_ssid', 'your_password')
while True:
    # Read temperature data from TMP102 sensor
    temp_sensor = machine.ADC(machine.Pin(32))
    temp_c = temp_sensor.read_u16()  (3.3 / 65536)  100
    print('Temperature: {:.2f}C'.format(temp_c))
    time.sleep(1)
```
### Example 2: Accelerometer Data and LED Indication (C/C++)
This example demonstrates how to read accelerometer data and indicate the orientation of the board using the on-board RGB LED.
```c
#include <M5Atom.h>
M5Atom atom;
void setup() {
    atom.begin();
}
void loop() {
    // Read accelerometer data
    int16_t ax, ay, az;
    atom.lis.readData(&ax, &ay, &az);
// Determine orientation based on accelerometer data
    if (ax > 2000) {
        atom.led.fill(0x0000ff); // Blue for upright orientation
    } else if (ax < -2000) {
        atom.led.fill(0xff0000); // Red for inverted orientation
    } else {
        atom.led.fill(0x00ff00); // Green for horizontal orientation
    }
delay(50);
}
```
### Example 3: IoT Remote Monitoring using MQTT (Arduino)
This example demonstrates how to use the M5Stack ATOM Matrix as an IoT device to send sensor data to an MQTT broker for remote monitoring.
```c
#include <WiFi.h>
#include <PubSubClient.h>
// MQTT broker details
const char mqttServer = "your_mqtt_broker";
const char mqttTopic = "your_mqtt_topic";
const char mqttUsername = "your_mqtt_username";
const char mqttPassword = "your_mqtt_password";
WiFiClient espClient;
PubSubClient client(espClient);
void setup() {
    // Initialize Wi-Fi and connect to network
    WiFi.begin("your_ssid", "your_password");
    while (WiFi.status() != WL_CONNECTED) {
        delay(1000);
        Serial.println("Connecting to Wi-Fi...");
    }
    Serial.println("Connected to Wi-Fi");
// Connect to MQTT broker
    client.setServer(mqttServer, 1883);
}
void loop() {
    // Read temperature data from TMP102 sensor
    int temp_c = analogRead(32)  (3.3 / 4095)  100;
// Publish sensor data to MQTT topic
    char message[50];
    sprintf(message, "Temperature: %dC", temp_c);
    client.publish(mqttTopic, message);
delay(5000);
}
```
These examples demonstrate the versatility and ease of use of the M5Stack ATOM Matrix in various IoT applications.