diff --git a/raspberryPi/ultrasonic_client.py b/raspberryPi/ultrasonic_client.py index 6b762276..c7b22ee0 100644 --- a/raspberryPi/ultrasonic_client.py +++ b/raspberryPi/ultrasonic_client.py @@ -49,7 +49,7 @@ def measure(): distance = measure() print "Distance : %.1f cm" % distance # send data to the host every 0.5 sec - client_socket.send(str(distance)) + client_socket.send((str(distance)).encode('utf-8')) time.sleep(0.5) finally: client_socket.close()