m5p3nc3r

Simulating Christmas

The target platform for the Christmas Lights does not yet exists, the PCB's are still being manufactured, and I really don't want to have to wait for the system to be complete before I can start exporing the visual effects I would like to create.

In order to progress with the software ahead of hardware, I need a platform that will simulate the target system. I will cover some of the design desicions that informed my choices here in other posts in this series, but the key points to not are:

This does limit my choices a bit, but there is no reason that the simulator itself needs to be constrained by no-std, I just need to keep a clean seperation between simulator and simulated code.

Bevy game engine

I have been playing with Bevy for a while, so it was the obvious choice. I will probably write more about Bevy in a later post, but at a high level, it allows the composition of complex applications through its use of ECS.

One other huge benifit of using Bevy is its ability to target a wasm32-unknown-unknown system - this means that I can publish the simulator to the web :o)

If you click on the iframe above, you can use the number keys to change the animation.

The theory here is that the code running here is identical to the code that will run on the microcontroller that controls the LED's in the final project. A classic example of WYSIWYG (for those old enough to remember).

Conculsion

There is a lot here, and I was too excited to get this post out once everything was working to do a full writeup today. I will add more details later, along with publishing all the code to github.

If you want to chat about any of this, you can normally find me hanging out on the DevEco Discord server.