I Made My ESP32-S3 Faster by Optimizing for SIZE — Not Speed I tuned a hot path on an ESP32-S3 and found the counter-intuitive winner: optimizing for size (-Os) beat optimizing for speed (-O2). On this chip, flash latency and instruction cache behavior dominate—tighter code stays in cache, misses less, and runs faster. Bumping the CPU to 240 MHz, switching flash to QIO, and maxing caches helped too, but -Os still edged out -O2. As always, benchmark your own workload—yours might differ. 06 March 2026
Turning an ESP32 into a Thermal USB Webcam Last time I faked a webcam on an ESP32; this time I built a real one. The ESP32-S3’s native USB + UVC with MJPEG makes a normal camera dead simple—grab JPEG frames and stream. The fun bit is turning an MLX90640 (32×24 thermal) into a proper USB camera: read over I2C, color-map, scale up to 320×240 (nearest or bilinear), JPEG encode, and stream—works in any camera app, no drivers. Bonus lesson: if an I2C scan finds nothing, stop blaming software; mine was a bad 3.3 V regulator solder joint. 15 February 2026
PDM Microphone Mystery I was puzzled that ESP-IDF’s PDM I2S config has no LR pin—until I actually read the mic’s datasheet. On PDM mics, LR isn’t a word-select clock at all; it picks which clock edge the mic drives and tri-states on the opposite edge. Tie one mic’s LR low and the other high and both share the same data line for stereo—no extra GPIO needed. I scoped it with some nice pogo probes to confirm, and it matches the timing diagrams perfectly. Net win: one fewer pin in the next design. 10 October 2025
ESP32-S3 USB UAC I turned my new ESP32‑S3 board into a USB Audio device. After a ninja LED fix and confirming the IMU and charging, I streamed mic audio over Web Serial (with a slick AI-made ‘Audio Studio’) and then via USB UAC. The mic sounds great, but the speaker is crackly over UAC—even though I2S WAV playback is perfectly clean. ESP-IDF worked; Arduino didn’t. Bonus annoyance: macOS vs Windows is a toggle, not a combo. Still, this board passes QA. 26 September 2025