This repository contains the hands-on labs for CSCI 4900/6900.
Throughout the course, we will use the M5Stack AtomS3R-M12 as our primary AIoT development platform. The labs will introduce sensing, embedded programming, wireless networking, computer vision, edge AI, and intelligent agents.
Each student will use an M5Stack AtomS3R-M12.
The board integrates an ESP32-S3 processor with several sensing and communication capabilities, including:
- ESP32-S3 processor
- 8 MB Flash and 8 MB PSRAM
- 3 MP camera
- Built-in IMU
- 2.4 GHz Wi-Fi
- USB-C programming and communication
- GPIO and expansion interfaces
This allows us to build systems that connect the physical world with networking and AI:
Physical World
↓
Sensors / Camera
↓
AtomS3R-M12
↓
Wi-Fi / USB
↓
Computer / Edge / Cloud
↓
AI
Before starting the labs, please configure your AtomS3R-M12 using the official M5Stack documentation.
Start with the official hardware documentation:
https://docs.m5stack.com/en/core/AtomS3R-M12
Familiarize yourself with:
- board interfaces
- camera
- IMU
- USB connection
- GPIO
- development environment
Follow the official AtomS3R-M12 Arduino tutorial:
https://docs.m5stack.com/en/arduino/m5atoms3r-m12/program
The tutorial explains how to:
- Install Arduino IDE
- Install the M5Stack Board Manager
- Select the M5AtomS3R board
- Install the required M5Stack libraries
- Connect the AtomS3R-M12 through USB
- Enter download mode
- Compile and upload an example program
Please complete this setup before starting the labs.
Before moving on, make sure that:
- Arduino IDE recognizes the board
M5AtomS3Ris selected as the development board- The correct USB serial port appears
- You can successfully compile and upload a program
- Serial Monitor can receive output from the board
If the board cannot be detected, first check that you are using a USB-C data cable, not a charging-only cable.
In this lab, you will learn how to read physical sensor measurements from the AtomS3R-M12 and send them to a computer.
You will:
- Read accelerometer and gyroscope data
- Send measurements through USB serial
- Receive serial data using Python
- Visualize device motion in 2D and 3D
Motion
↓
IMU
↓
AtomS3R-M12
↓
USB Serial
↓
Python
↓
Visualization
In this lab, you will turn the AtomS3R-M12 into a network-connected camera.
You will:
- Initialize the onboard camera
- Connect the board to Wi-Fi
- Capture camera frames
- Run a lightweight web server
- Stream camera images over the network
- View the live stream from a browser
Camera
↓
AtomS3R-M12
↓
Wi-Fi
↓
Network
↓
Browser / Computer
In this lab, you will explore how an embedded device can become an AI agent.
You will:
- Configure an ESP-based AI agent
- Connect the device to Wi-Fi
- Configure an LLM provider
- Interact with the agent
- Explore how AI reasoning can connect with physical devices
The goal is to move beyond traditional IoT systems:
sense → transmit → process
toward intelligent AIoT systems:
sense → understand → reason → communicate → act
course-AIoT-Lab/
│
├── README.md
│
├── Lab-0-IMU-serial/
│ ├── README.md
│ ├── imu-serial/
│ ├── imu-compass.py
│ └── imu-compass-3d.py
│
├── Lab-1-camera-streaming/
│ ├── README.md
│ └── camera_edurom/
│
└── Lab-2-ESP-Claw/
└── README.md
Each lab directory contains its own README.md with detailed instructions.
Please read the corresponding lab README before starting each lab.
git clone https://github.com/Pervasive-Intelligence-Lab/course-AIoT-Lab.git
cd course-AIoT-LabTo start a lab, enter its directory. For example:
cd Lab-0-IMU-serialThen follow the instructions in that directory's README.md.
Some labs may require Wi-Fi credentials or API keys.
Never commit passwords, API keys, or other private credentials to GitHub.
Use placeholders such as:
const char* username = "your_username";
const char* password = "your_password";A charging-only USB-C cable can power the AtomS3R-M12 but cannot upload programs or communicate over serial.
The serial port may change after reconnecting the board or entering download mode. Always verify the selected port before uploading.
Each lab may require different libraries, configuration steps, and software packages.
Always follow the README inside the corresponding lab directory.