All‑In‑One Box
Overview
This box can do many things, such as displaying the time and date as a binary clock. With more than seven built‑in sensors, it can measure its surroundings. It can obtain weather data from a web API and display it on the eight‑by‑eight LED matrix. With a simple rotation, it can be turned into a spectrum analyzer for music visualization. And of course, everything can be controlled and viewed on a locally hosted website.
This project went through countless iterations. The first versions were just some blue LEDs on a breadboard. Over time, it became an LED matrix in a wooden box, with holes drilled into it. Now there are 64 individually addressable LEDs in a perfect matrix inside a custom 3D‑printed multimaterial case, providing clean looks and great diffusion of the lights (without light bleeding into neighboring boxes).
Tech Stack
- Language: C++
- Hardware: ESP32
- Design: Fusion 360 CAD, 3D printing
- Frontend: HTML, CSS, JavaScript
- Sensors: IMU, temperature, humidity, microphone, brightness, IR, shock
Key Features
- Time: Displaying date and time in binary, synced via RTC.
- Audio: Music spectrum analyzer using a built‑in microphone and Fast Fourier Transform.
- Web:
- Web interface for full control of the cube
- Real‑time weather data, based on the current location compared to data collected by internal sensors
- Full control over display modes and colors
- Extras:
- Controllable via cube rotations
- Animated weather display on the matrix every five minutes
Challenges & Learnings
- Data: Working with many sensors, each with its own polling rate and protocol, required writing my own library to obtain raw data directly, rather than using additional libraries.
- Blocking Threads: Non‑blocking animations and web handling.
Because the ESP32 has two cores, not everything can be split into separate threads. Therefore, the website runs on one core, and the rest of the code runs on the other. To prevent animations from blocking critical sensor data, a multiplexing setup was used to quickly switch between different tasks.
Gallery
Here are some pictures and videos taken during development.