AI Classroom Nameplate - Seeed Studio XIAO ESP32S3 Sense - rong - CodeCraft Hub
Scene: Smart Home. Edge AI application on CodeCraft Hub for Smart Home use cases.
Devices / BOM: Seeed Studio XIAO ESP32S3 Sense, Grove - Universal 4 Pin Buckled 20cm Cable (5pcs), Grove Shield for Seeed Studio XIAO, Grove - 16X2 LCD RGB Backlight - Full Color Display
Smart Home application on CodeCraft Hub. The AI Classroom Status Board is an AI vision intelligent classroom sensing system based on dual XIAO ESP32S3 Sense main controllers. Leveraging embedded AI vision recognition technology, the project enables fully automatic detection of personnel status in classrooms, signal anti-shake processing,
Documentation
Project Background Traditional campus classrooms and self-study rooms generally lack intelligent status monitoring tools. Classroom occupancy cannot be visualized in real time. Students searching for vacant classrooms and administrators conducting room inspections both rely on manual judgment, resulting in low efficiency and significant delays. With the advancement of smart campus development, lightweight, low-power, and local intelligent sensing devices have become a necessity for campus intelligent renovation.
Based on embedded AI technology, this project breaks the detection limitations of traditional infrared and passive infrared human sensors. It uses vision-based AI to accurately detect human presence with stronger anti-interference capability. Combining hardware signal transmission with a software debounce algorithm, the system resolves false triggering caused by transient disturbances and achieves highly reliable, low-false-positive, fully automatic classroom status monitoring.
The project delivers both educational value and practical deployment value. It can serve as a smart classroom terminal prototype, a case for embedded state machine development, and an introductory training example for AIoT.
Deploy steps
- Project Function Description
This project adopts a dual-device distributed architecture with separated AI perception and display for a clear structure.
1.XIAO-A (AI Perception End)
Human/face detection is realized via the onboard camera: output HIGH when a person is detected, output LOW when no person is detected. It is only responsible for collecting status signals.
2. XIAO-B(Display Terminal)
Read the level signal from XIAO-A. The pin is set to pull-down mode to prevent false triggering caused by floating state.
A high level maintained for 300 ms indicates a person is present, and a low level maintained for 1000 ms indicates no person is present.
LCD status display: blue LED on power-up, orange LED indicator when a person is detected, green LED indicator when no person is detected.
The screen refreshes only when the status changes to avoid flickering.
- Hardware Wiring
XIAO-A D0 → XIAO-B D0
XIAO-A GND → XIAO-B GND
LCD SDA → XIAO-B D4(GPIO5)
LCD SCL → XIAO-B D5(GPIO6)
- Firmware Source Code
XIAO-A( Flash Firmware and Model )
1、Platform Access Link : https://sensecraft.seeed.cc/ai/device/local/32
2、Connect the device (XIAO-A) - Flash the model ( https://sensecraft.seeed.cc/ai/model/detail?id=60080 ) - Configure GPIO output
XIAO-B( Flash Firmware )
Three methods are available to flash the firmware: 1、Compile the source code into firmware and flash it to Device B.
Code snippet included — open the application page to copy it.
Generate firmware using the https://codecraft.seeed.cc/ platform: Prompt
Code snippet included — open the application page to copy it.
3、Flash Firmware
Flash firmware to your device (in-app tool on CodeCraft Hub).
- Troubleshooting of Common Issues
Screen not lighting up: Check the SDA/SCL pins and whether the library is installed.
Always showing no person detected: Check common ground for both boards and verify if XIAO-A outputs high level normally.
Flickering status: Poor wire contact, inspect the jumper wires.
No random state changes upon disconnection: Pull-down and debouncing enabled for stable fault tolerance.
- Project Expansion Directions
Add delayed unoccupied judgment to simulate automatic idle status after class ends;
Integrate WiFi to upload classroom status to the cloud;
Link lights and buzzers to realize intelligent reminders.
- Project Difficulty
Medium difficulty, suitable for beginners. It covers basic embedded knowledge points including AI vision applications, non-blocking programs, software debouncing, and I2C screen drivers, featuring simple wiring, concise code and high stability.