Become the sender !

As I wrote in my previous posts, the ESP, the STM and the server were working together to receive images or animations depending of what the user wants. Now it’s time for the STM to become the sender.

The objective:

We want the devices to be able to received images from the server but we also want to establish a connection between Touchs to send images from one to the other. On top of that at the end we want to have a communication between both devices in both ways. But as you may know chi va piano va sano. So first things firts, we implemented the emitting part for the first device.… Read more

The clearer, the better.

For the last two days, I mostly spent time making the code clearer. Some big functions got divided to make them easier to read and to modify once we will get the test PCB.

The second thing was to add semaphores to protect the variable shared between our threads on both the ESP and the STM. I also create a new thread that will be used to display the image or the animation we receive from the ESP. So far it only prints on the console the value of each bytes but having it already created allowed me to add the semaphores on the image so that when we will be trying to display images with the coils we will simply have to deal with the coils.… Read more

Steady, ready, capture !

I’ve been working on coding a section of a speed feedback system since Thirsday. We need a way to frequently measure the motor speed for two reasons:

  • To adjust the motor speed if it deviates from the target speed
  • To compute the precise time at which we need to flash the LEDs

To accomplish this, we have optical and hall sensors (we will use the sensor that gives the best precision) hooked up to our rotating PCB and our bottom fixed PCB. The rotating PCB is the one sending the commands to flash the LEDs, and the bottom is the one sending Dshot to our ESC.… Read more