We wanted to be able to send commands from the server to the plant. We didn’t expect to face a lot of problems, but there were some : I sent booleans as True or False when Sylvain expected 1 or 0 when reading the commands, there were some problems with database requests and we decided to add a synchronization between the database on the server and the plant when the plant is set on. I had to do the according modifications on the server side.
I also tried to improve the touch detection algorithm : i decided to not use the data directly but to use 1/(data)² as according to the datasheet it should be proportional to the measured capacity. I tried to compare new values with the mean of the last values, and if the difference is to big, I conclude that there is a touch. It seems to work quite well after fixing the coaxial cable to the plant, but after some point it works quite badly but goes better when re-fixing the cable, so we will see how it works when putting cables on the real plant used for the demo.
I also prepared the servomotors, they are now ready to be used to shake the leaves.
Now, we will have to put every mechanical part of the project on the real plant and to end interfacing everything together.