Our annual conference, Teardown, kicks off in 4 days. Join us in Portland, OR, USA.

Air Lab

A playful and portable air quality measuring device

Available for pre-order

View Purchasing Options
May 27, 2025

Project update 5 of 6

Firmware Simulator

by Juan G, Joël G

Firmware Simulator

Hello everyone! This week’s update is a special one. We’re thrilled to announce “Air Lab Simulator” a web-based experience that allows you to play with the firmware comfortably from your browser. Check it out now at https://networkedartifacts.com/airlab/simulator.

How does it work?

We have always dreamt of having a simulator to run the Air Lab firmware on a computer. Such a tool would drastically simplify the development, especially UI-related code that requires frequent tests on a device.

In the past, we tested various methods to build such a simulator. For example, we played with virtualization, as the esp-idf already supports QEMU, and explored scripting languages like Lua to code only the UI part and run it in a host app. Both approaches seemed either too complex or required a substantial amount of new code to support them.

In a final test, we attempted to compile the firmware with emscripten. This did not work immediately. But after mocking most of the APIs, we got it eventually running. Based on that success, we began a substantial firmware rewrite that separated the hardware-specific code into a Hardware Abstraction Layer (HAL). This change reduced the API surface drastically and simplified the writing of adapters to the Web platform.

At the beginning of last week, we got everything working on the firmware-level and started building the surrounding app. In the process, we fixed various bugs and race conditions that were not apparent due to hardware latency on the ESP32.

Next Steps

We’re excited about what we achieved and look forward to hearing the feedback. The simulator is a great way for people to test the device before buying it. But we do not want to stop there. We plan to refine this technology in the next few months and ship it as part of the open-source firmware to everyone that wants to customize the Air Lab firmware. Look out for a future update on this. Cheers!


Sign up to receive future updates for Air Lab.

Subscribe to the Crowd Supply newsletter, highlighting the latest creators and projects