The first issue is about the receipt of the information by the Arduino, when we send a string with a number more than ten, the Arduino collect only the first number. For instance, when we send 32, the Arduino receive the first number, so 3.
The method used at that time was Serial.read(). We also tried Serial.readstring(), unfortunately it was also unconvincing.
After some tests with theses commands, we finally decided to modify the speed of the transmission, i.e. the data rate in bits per second, from the begin method and It works!
Our second issue concerned the mixture of the information send by the Raspberry and memorised in the buffer. We use Tkinter which allow us to send a string when the user press buttons by using each function for each button. However, we also send in a thread function the number 1 every 5 seconds to ask to the Arduino to send back sensor values and timetables 1 and 2. Consequently, when the user press the button exactly at the same time the Raspberry send 1, the information are mixed together. For instance, when user send the target temperature, the Raspberry don’t send 22 but 122 or 221.
Currently we are looking for a solution to fix this issue.
Stay tuned, we will be right back.