Stufin
Home Quick Cart Profile

M5 Stack ATOM Lite

Buy Now

Compact size

24mm x 16.5mm

Weight

2g

Operating temperature

-20C to 85C

  • Certifications:

FCC, CE, and RoHS compliant

Applications

  • Smart Home Automation: Control and monitor home appliances, lighting, and security systems.
  • Industrial Automation: Monitor and control industrial equipment, sensors, and actuators.
  • Wearable Devices: Develop wearable devices, such as smartwatches, fitness trackers, and healthcare monitors.
  • Robotics: Create autonomous robots, drones, and other robotic systems.
  • Environmental Monitoring: Monitor and track environmental parameters, such as temperature, humidity, and air quality.
The M5 Stack ATOM Lite is suitable for a wide range of IoT applications, including

Conclusion

The M5 Stack ATOM Lite is a powerful, compact, and cost-effective IoT module that offers a rich set of features and peripherals, making it an ideal choice for a wide range of IoT applications. Its low power consumption, wireless connectivity, and versatility make it an attractive option for developers, designers, and engineers working on IoT projects.

Pin Configuration

  • M5 Stack ATOM Lite Pinout Documentation
  • The M5 Stack ATOM Lite is a compact, low-power microcontroller board based on the ESP32-PICO-D4 system-on-a-chip (SoC). It features a rich set of peripherals, making it an ideal choice for various IoT applications. This documentation provides a detailed explanation of the pins on the M5 Stack ATOM Lite, along with connection guidelines.
  • Pinout Overview
  • The M5 Stack ATOM Lite has a total of 14 GPIO pins, 4 power pins, and 2 reset pins. The pins are arranged in two rows of 10 pins each on the top and bottom of the board.
  • GPIO Pins (14)
  • Here's a detailed explanation of each GPIO pin:
  • 1. G0 (GPIO0)
  • Function: Input/Output
  • Use: General-purpose I/O, can be used as a digital input or output
  • 2. G2 (GPIO2)
  • Function: Input/Output
  • Use: General-purpose I/O, can be used as a digital input or output
  • 3. G4 (GPIO4)
  • Function: Input/Output
  • Use: General-purpose I/O, can be used as a digital input or output
  • 4. G12 (GPIO12)
  • Function: Input/Output
  • Use: General-purpose I/O, can be used as a digital input or output
  • 5. G13 (GPIO13)
  • Function: Input/Output
  • Use: General-purpose I/O, can be used as a digital input or output
  • 6. G14 (GPIO14)
  • Function: Input/Output
  • Use: General-purpose I/O, can be used as a digital input or output
  • 7. G15 (GPIO15)
  • Function: Input/Output
  • Use: General-purpose I/O, can be used as a digital input or output
  • 8. G16 (GPIO16)
  • Function: Input/Output
  • Use: General-purpose I/O, can be used as a digital input or output
  • 9. G17 (GPIO17)
  • Function: Input/Output
  • Use: General-purpose I/O, can be used as a digital input or output
  • 10. G18 (GPIO18)
  • Function: Input/Output
  • Use: General-purpose I/O, can be used as a digital input or output
  • 11. G19 (GPIO19)
  • Function: Input/Output
  • Use: General-purpose I/O, can be used as a digital input or output
  • 12. G21 (GPIO21)
  • Function: Input/Output
  • Use: General-purpose I/O, can be used as a digital input or output
  • 13. G22 (GPIO22)
  • Function: Input/Output
  • Use: General-purpose I/O, can be used as a digital input or output
  • 14. G23 (GPIO23)
  • Function: Input/Output
  • Use: General-purpose I/O, can be used as a digital input or output
  • Power Pins (4)
  • 1. VCC (3.3V)
  • Function: Power supply
  • Use: Provides 3.3V power to the board
  • 2. GND (Ground)
  • Function: Ground
  • Use: Provides a common ground reference for the board
  • 3. VIN (5V)
  • Function: Power supply (optional)
  • Use: Can be used to power the board with an external 5V power source
  • 4. USB (5V)
  • Function: Power supply (optional)
  • Use: Can be used to power the board through USB connection
  • Reset Pins (2)
  • 1. RST (Reset)
  • Function: Active-low reset
  • Use: Can be used to reset the board
  • 2. EN (Enable)
  • Function: Active-high enable
  • Use: Can be used to control the power state of the board
  • Connecting the Pins
  • When connecting the pins, make sure to follow these guidelines:
  • Use a suitable breadboard or PCB to connect the components.
  • Ensure correct polarity when connecting power sources (e.g., VCC, GND, VIN).
  • Use jumper wires or suitable connectors to connect the pins to other components.
  • Always refer to the datasheet and documentation of the components being connected to ensure compatibility and correct usage.
  • Avoid overloading or short-circuiting the pins, as this can cause damage to the board or other components.
  • By following this documentation, you should be able to successfully connect and utilize the pins on the M5 Stack ATOM Lite for your IoT projects.

Code Examples

M5 Stack ATOM Lite Documentation
Overview
The M5 Stack ATOM Lite is a mini IoT development board based on the ESP32-Pico-D4 system-on-chip (SoC). It features a compact design, built-in Wi-Fi and Bluetooth capabilities, and a range of interfaces for connecting sensors and peripherals.
Technical Specifications
Microcontroller: ESP32-Pico-D4
 Wi-Fi: 802.11 b/g/n
 Bluetooth: 4.2
 Memory: 4MB Flash, 520KB SRAM
 Interfaces: USB-C, UART, I2C, I2S, SPI, GPIO
 Power: USB-C, 3.3V input
 Dimensions: 24.5mm x 15.5mm x 3.5mm
Getting Started
To get started with the M5 Stack ATOM Lite, you'll need to:
1. Install the M5 Stack Arduino Core library for ESP32.
2. Connect the board to your computer using a USB-C cable.
3. Open the Arduino IDE and select the M5 Stack ATOM Lite board from the Boards menu.
Code Examples
### Example 1: Wi-Fi Connectivity and LED Blinking
This example demonstrates how to connect to a Wi-Fi network and blink the built-in LED on the M5 Stack ATOM Lite.
```c
#include <WiFi.h>
const char ssid = "your_wifi_ssid";
const char password = "your_wifi_password";
void setup() {
  Serial.begin(115200);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.println("Connecting to WiFi...");
  }
  Serial.println("Connected to WiFi");
  pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);
  delay(500);
  digitalWrite(LED_BUILTIN, LOW);
  delay(500);
}
```
### Example 2: I2C Communication with a Sensor
This example demonstrates how to connect a BME280 temperature and humidity sensor to the M5 Stack ATOM Lite using I2C and read sensor data.
```c
#include <Wire.h>
#include <BME280.h>
BME280 bme;
void setup() {
  Serial.begin(115200);
  Wire.begin();
  if (!bme.begin()) {
    Serial.println("Failed to initialize BME280 sensor");
    while (1);
  }
}
void loop() {
  int temperature = bme.readTemperature();
  int humidity = bme.readHumidity();
  Serial.print("Temperature: ");
  Serial.print(temperature);
  Serial.println(" C");
  Serial.print("Humidity: ");
  Serial.print(humidity);
  Serial.println(" %");
  delay(1000);
}
```
### Example 3: Web Server with HTTP Requests
This example demonstrates how to create a simple web server on the M5 Stack ATOM Lite that responds to HTTP requests.
```c
#include <WiFi.h>
#include <WiFiClient.h>
#include <ESPmDNS.h>
const char ssid = "your_wifi_ssid";
const char password = "your_wifi_password";
WiFiServer server(80);
void setup() {
  Serial.begin(115200);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(1000);
    Serial.println("Connecting to WiFi...");
  }
  Serial.println("Connected to WiFi");
  if (MDNS.begin("m5stack-atom-lite")) {
    Serial.println("MDNS responder started");
  }
  server.begin();
}
void loop() {
  WiFiClient client = server.available();
  if (client) {
    String request = client.readStringUntil('
');
    if (request.indexOf("/ledon") != -1) {
      digitalWrite(LED_BUILTIN, HIGH);
      client.println("HTTP/1.1 200 OK");
      client.println("Content-Type: text/html");
      client.println();
      client.println("<h1>LED is on</h1>");
    } else if (request.indexOf("/ledoff") != -1) {
      digitalWrite(LED_BUILTIN, LOW);
      client.println("HTTP/1.1 200 OK");
      client.println("Content-Type: text/html");
      client.println();
      client.println("<h1>LED is off</h1>");
    } else {
      client.println("HTTP/1.1 404 Not Found");
      client.println("Content-Type: text/html");
      client.println();
      client.println("<h1>Not Found</h1>");
    }
    client.stop();
  }
  delay(10);
}
```
These examples demonstrate the basic functionality of the M5 Stack ATOM Lite and provide a starting point for more advanced projects.