Commit 80f3f03b authored by Daniel Kolibár's avatar Daniel Kolibár
Browse files

Update camera.py

parent f1edfa74
......@@ -18,9 +18,8 @@ def customStudentDecoder(studentDict):
def on_message(client, userdata, msg):
messagedecoded = str(msg.payload.decode("utf-8"))
print(messagedecoded)
y = json.loads(messagedecoded)
print(y)
if str(msg.payload.decode("utf-8")) == 'TAKE_PHOTO':
jsoned_message = json.loads(messagedecoded)
if jsoned_message["command"] == 'TAKE_PHOTO':
print('taking photo!')
photo = io.BytesIO()
with picamera.PiCamera() as camera:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment