The end of the project is close now, so we have to make as many things work as possible. At the beginning of the week, we still had 2 problems to solve: the touch detection that didn’t worked well and the music download, that was of very poor quality (very frequently, the music “freezes”, which gives a very bad effect). So the goal of this week was to solve these 2 problems. And we are very close to achieve it.
On Monday morning, I worked on the touch detection, trying to understand where does the problem come from. I performed many tests, with different settings, without any results. When Tanguy arrived, he tried once with the original configuration and it worked (he was able to detect a touch at least). Then, I worked on the mechanic: Alexis had brought us 3 new plants, so we had to choose our preferred one. We made some tests with the servomotors to see how a move of the leaves looks like. It doesn’t turn the plant into a fan, but the move is large enough to be clearly visible. After that, I worked on the roof of the container for the PCB and the servomotors and printed it.
Yesterday, I worked on the music download and on the container for the LEDs. The container looks nice (I will take photos for the next post).
For the music download, I finally found why the music “freezes”: it’s because I’ve put my buffers in flash and I’ve to erase the flash sector before being able to write in it. And this erase operation is so long (and blocking) that it can be heard. Using the flash for the buffer thus can’t be a solution, so i tried to put my buffers in RAM, because there is no reason that it doesn’t work. In the evening, Samuel suggested me some ways to improve my code. So I implemented these ideas and this morning, I tested them. Unfortunately, it didn’t work immediately… And I spent several hours trying to solve crazy problems with FIFO. I finally decided to test the code at each commit written yesterday evening, to see how the results evolved. And at two of them, it worked perfectly… Samuel reviewed the changes made at the following commit and found a mistake (a variable used instead of another one). And all what I’ve implemented yesterday evening worked once this mistake corrected. So now, the music download seems to work (I will perform new tests tomorrow morning to see if it really works everytime).
During the next days, I will merge the code written the past few days in the main branch and prepare our code for the presentation. And I also have to add content to the server.