The ESP32-C3 SuperMini serves as Classify’s physical attendance trigger. Once flashed, it connects to your local network, sends periodic heartbeats to the Classify API, and fires an attendance event whenever the BOOT button is pressed. This page walks you through setting up your credentials, choosing an IDE, and uploading the firmware.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Taykl12/Classify/llms.txt
Use this file to discover all available pages before exploring further.
Hardware required
- ESP32-C3 SuperMini board
- USB-C cable (data-capable, not charge-only)
- Your Classify server running and reachable on the local network (see Environment Setup)
Step 1 — Create your credentials file
The firmware reads WiFi and API credentials fromesp32/include/secrets.h. This file is excluded from version control, so you must create it yourself by copying the provided example.
Fill in your credentials
Open
esp32/include/secrets.h and replace the placeholder values:| Field | Description |
|---|---|
WIFI_SSID | Your 2.4 GHz network name |
WIFI_PASSWORD | WiFi password |
API_BASE_URL | LAN IP of the machine running the Classify server, including port 3001 |
DEVICE_TOKEN | Shared secret — must match ESP32_DEVICE_TOKEN in server/.env |
Step 2 — Flash the firmware
Choose the IDE that fits your workflow. Both use the same source code.Arduino IDE instructions
Install the ESP32 board package
In Arduino IDE, go to File → Preferences and add the following URL to Additional boards manager URLs:Then open Tools → Board → Boards Manager, search for
esp32, and install the ESP32 by Espressif Systems package.Select the correct board and settings
Go to Tools and configure:
- Board:
ESP32C3 Dev Module - USB CDC On Boot:
Enabled - Upload Speed:
460800 - Port: select the COM/tty port for your device
The ESP32-C3 SuperMini uses native USB via CDC. You must set USB CDC On Boot: Enabled — without it the serial monitor will not receive output and uploads may fail on some systems.
Step 3 — Verify the device is running
Once the firmware boots, the device will immediately attempt to join WiFi and start its heartbeat loop. Expected serial output on a successful start:GPIO reference
| GPIO | Function | Notes |
|---|---|---|
| 9 | BOOT button (input, pull-up) | Active LOW; 200 ms debounce |
| 8 | Blue onboard LED (output) | Active LOW — LOW = on |
Button and LED behavior
- Button press + release schedules a
POST /api/device/esp32/buttonwith anX-Device-Tokenheader. - On a successful POST, the blue LED blinks twice to confirm the event was received.
- A 12-second HTTP quiet period follows each button POST to prevent duplicate triggers.
- A 4-second minimum interval is enforced between successive button posts.
API endpoints used by the device
| Method | Path | Purpose |
|---|---|---|
GET | /api/device/esp32/heartbeat | Keepalive ping every 8 seconds |
POST | /api/device/esp32/button | Attendance trigger on button press |
POST /api/device/esp32/button endpoint returns:
Admin monitoring
These endpoints require an admin JWT and are not called by the device itself:| Method | Path | Purpose |
|---|---|---|
GET | /api/admin/esp32/status | View device status and last heartbeat |
POST | /api/admin/esp32/reset | Reset the press counter to zero |
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| No serial output | USB CDC On Boot disabled | Re-flash with CDC On Boot: Enabled |
WL_NO_SSID_AVAIL | Wrong SSID or 5 GHz network | Check WIFI_SSID; use a 2.4 GHz network |
401 Unauthorized | Token mismatch | Ensure DEVICE_TOKEN matches ESP32_DEVICE_TOKEN in server/.env |
| Heartbeat backoff increasing | Server unreachable | Verify API_BASE_URL IP and that the server is running on port 3001 |