From e971f26af95d180eec2a306f9e5df06bc01c3252 Mon Sep 17 00:00:00 2001 From: Shafaeit Hossain Date: Fri, 26 Apr 2019 15:04:17 +0600 Subject: [PATCH] Update ultrasonic_client.py --- raspberryPi/ultrasonic_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()