LOG
Building Amore: Firmware, Captive Portals, and ESP32 Haptics
When you build physical hardware, there is nowhere to hide bad architectural decisions. If a cloud server hiccups, you can retry with exponential backoff in the background. If a connected lamp loses Wi-Fi while a person is tapping it, the device feels dead in their hands.
Amore was built to bridge that gap: a touch-sensitive ESP32 lamp paired with Serenade, a native companion app that mirrors the device's state in real time.
The Dual-Protocol Strategy: MQTT + BLE
A connected home device needs two communication layers that solve fundamentally different problems:
- BLE (Bluetooth Low Energy) for local-first discovery, pairing, and zero-latency nearby controls.
- MQTT for low-overhead, bi-directional telemetry when you want to send light states or a heartbeat pulse from across the globe.
// ESP32 State Dispatcher Snippet
void handleTouchInterrupt() {
uint32_t now = millis();
if (now - lastTouchTime > DEBOUNCE_MS) {
touchTriggered = true;
hapticMotor.vibrate(HAPTIC_CLICK);
lastTouchTime = now;
}
}
Zero-Friction Onboarding: The Captive Portal
The worst user experience in IoT is entering Wi-Fi credentials into firmware. On first power-up (or after a 30-second touch reset), Amore spins up an internal Access Point and a captive DNS portal.
Once connected to Amore-Setup, the device serves an onboarding page directly from flash storage. As soon as the home Wi-Fi credentials are saved, it switches into station mode and registers with MQTT in under three seconds.
LED Choreography & Haptic Feedback
Driving WS2818B addressable LEDs alongside active Wi-Fi and Bluetooth stacks requires strict timing discipline. Interrupt conflicts will cause flickering or dropped packets if animations are blocked on network I/O.
By offloading the animation tick to a dedicated FreeRTOS task running on ESP32 Core 1 while networking runs on Core 0, the light animations stay butter-smooth at 60 FPS regardless of signal conditions.
The Lesson
Good hardware engineering is mostly software ergonomics. The best connected devices are the ones that never make you think about the microcontrollers, brokers, or protocols running behind the scenes.