So, I'm sending a number from python to my arduino using PySerial, and then transferring it back to python and displaying it. Integer numbers work great!
However, when sending a floating point number (number with a decimal), then my zeros get deleted in the conversion process: 10.2 becomes 1.2 230.4 becomes 23.4 203.04 becomes 23.4, etc.
Any ideas why this happens?
Arduino (Relevant) Code msg = Serial.read(); Serial.print(msg);
Python (Relevant) Code test_string = 202.023 arduino.write(test_string) print (arduino.read(4))