Adding images #27

Merged
senaduka merged 18 commits from adding_images into master 2016-10-08 18:55:42 +02:00
2 changed files with 19 additions and 0 deletions
Showing only changes of commit 4c1f3f9f43 - Show all commits

View File

@@ -0,0 +1,3 @@
import camera
camera.capture_picture():

16
controller/camera_send.py Normal file
View File

@@ -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
})