For reminder, as the
main intelligence in a Phyllo is main_pcb which will be rotating, we
cannot tolerate to only have a shell over USB. Thus we have decided
to have connect to a shell using WiFi.
I have been
implementing this those past few days. Surprisingly, I actually
encountered a few friction points.
First, let me
describe more precisely the situation we have. The shell is
controlling the STM32 and the WiFi is run by an ESP32. We thus have
two layers of data transmission. The first one with WiFi between the
user and the ESP32 and another one via a data bus between the ESP32
and the STM32.… Read more
As explained on my previous post, the communication between the ESP and STM will append through a protocol made to discriminate data and command bytes. We already had the code to send images from the ESP to the STM and this post will be about sending animations from the ESP to the STM.
Our first idea was to start like for the images with a byte to warn the STM about the kind of data that will be transmitted. TO do so we will start the communication with the byte “ANIM”. Then we wanted to send, after the ACK_BEGIN, the size and the animation itself in one time.… Read more
Today was day of the test. It was actually quite different from what I planned, in this post especially.
First of all, I did not manage to make an ESP32 receive its own broadcasted packet. Apparently, it is not natural for a device to receive a packet sent by itself. I still have some leads to follow about it so I will maybe continue to look for a solution. In this test, there was simply an ESP32 which did not received packets. It is also possible to accept that. Indeed, we will have 2 ESP32 on each Phyllo. One on the main_pcb and another on the bottom_pcb.… Read more
I kept preparing the timing test for the ESP32 today. The challenge was to understand how FreeRTOS works, of course, but also to grasp the workflow of the WiFi on the devkitC.
The example I found first was simply about coding a usual UDP server/client pair. However, when I arrived to the actual testing moment, I realized that there was barely any chance of it working as I did not even provide a basic username/password to my program. So I had to discover more about how to setup the actual WiFi connection.
It eventually worked out. However, I am now stuck on a very annoying problem.… Read more
Today, I started to implement the code necessary to test the possibility to use WiFi for time reference between Phyllos as explained in this post. Although we mainly use ChibiOS for our applications, the documentation for ESP32 is in FreeRTOS so the code for this test will also be using FreeRTOS.
The plan for the test is to connect as many devkitC as possible to a main board (here it will be an Olimex E407 programmed with ChibiOS). The main board will be the master over one of the devkitC. When it will start the test, the slave will broadcast an UDP packet.… Read more
Now that the Hall effect sensor is working and while the coils are still being tested with the marbles, we started working on our WiFi module. As explained in our project’s presentation, we want our devices to be able to communicate through MQTT with a backend and with other Touch.
The WiFi module :
To do our test we took an ESP32 Wroom-32 Dev kit C. The main purpose of this module will be to connect to the WiFi, receive through MQTT the images that the box will display and then transmit them to the STM32. In some cases, the STM32 will send to the ESP the state of the box and it will have to transfert those data through MQTT.… Read more