diff --git a/controller/camera_capture.py b/controller/camera_capture.py new file mode 100644 index 0000000..f1e89bd --- /dev/null +++ b/controller/camera_capture.py @@ -0,0 +1,3 @@ +import camera + +camera.capture_picture(): diff --git a/controller/camera_send.py b/controller/camera_send.py new file mode 100644 index 0000000..e3acd68 --- /dev/null +++ b/controller/camera_send.py @@ -0,0 +1,16 @@ +import camera +import requests +import config + +picture_base64 = camera.get_transfer_picture_base64() +if picture_base64 is not None: + camera.remove_transfer_picture() + +controller_id = config.CONTROLLER_ID +owner = "Controller: %s" % controller_id + +response = requests.post(config.PICTURE_URL + '/' + controller_id, json={ +"owner": owner, +"controllerId": controller_id, +"picture_base64": picture_base64 +})