UART’s breakthrough !

Today, thanks to Xavier’s tips, I finally managed to write a satisfying workflow for the UART server. I used the ChibiOS’ mailbox system on the STM32 and emulated it with queues on the ESP32.

Each applications is in charge of allocating the actual memory space of the data. The server only manages a 256 words long table to store a single pointer for each of the 256 possible ports. This pointer references two mailboxes. One enables the application to provide a buffer and its length to the server while the other enables the server to signal that a given buffer has been filled with a given number of bytes.… Read more

UART flow control

Today, as I was working on implementing the different servers from my last post, I realized a problem occurring on the UART connection between the main_esp and the main_stm. As I previously discussed in that post, I had to tackle the issue of distributing the traffic on the UART data bus.

To this end, I began to write a sort of server on the ESP32. It copies the port system on an internet server. The first byte of each frame encodes the function the following data line must be transferred to. In this approach, two problems must be tackled.… Read more

Let’s push it !

So far, the ESP32 was able to receive images from the server through MQTT and transmit them to the STM32. It also could transmit animations but only if the animation was directly hardcoded. So what we wanted to do was to be able to transmit animations through MQTT just like images and also to find a way to chose if we want to receive an animation or an image.

First things first : the server side

The first step we did to go in this direction was to find a way to transmit animations.
We chose that, at least for now, the server will publish periodically on two topics.… Read more

Let’s go all the way !

As I already wrote on previous post, we implemented a MQTT communication to send data from the server to the ESP, we also implemented an UART communication to pass data from the ESP to the STM. Now it is time to go all the way : sending data from the server all the way to the STM.

To do so we had to make a choice: at which point will we encode the data in regard of the communication protocol between ESP and STM.
As a remainder, to be able to differentiate data from commands, the bytes that will contain data will always start with a 1 and then code the state of 7 marbles.… Read more