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

How To Touch together ? MQTT is here.

One of the most critical part of the project will be the communication. Whether it is between the Touchs of with the backend we need our device to be able to communicate.

The communication challenge:

The first thing we had to do was to choose the protocol. As we wanted to allow both a communication with a backend and between devices, we chose the MQTT protocol. It has the advantages to be easy to use and to easily allow us to switch from listening to the server to listening an other device.

The first step: the broker:

In MQTT, all devices (may it be a server or an actual connected thing) are clients.… Read more