From 98063f9866e900c61739452713030fcf627028c8 Mon Sep 17 00:00:00 2001 From: Luke Berndt Date: Tue, 22 Dec 2020 11:31:08 -0500 Subject: [PATCH] Update camera.py --- pan-tilt-pi/camera.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pan-tilt-pi/camera.py b/pan-tilt-pi/camera.py index 697bb63..171f3ca 100755 --- a/pan-tilt-pi/camera.py +++ b/pan-tilt-pi/camera.py @@ -30,8 +30,12 @@ def on_message(client, userdata, message): command = str(message.payload.decode("utf-8")) update = json.loads(command) + payload = json.loads(messsage.payload) # you can use json.loads to convert string to json logging.info(type(update)) + logging.info(payload) + print(update) + print(payload) logging.info("Bearing: $d" % update["bearing"]) if (update["bearing"] < 90): logging.info("Setting Pan to: $d" % update["bearing"])