This commit is contained in:
hirnwunde
2020-08-07 05:28:22 +02:00
commit 6c60935778
8 changed files with 31 additions and 0 deletions

0
README.md Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

31
esp32cam-grabber/grab.py Normal file
View File

@@ -0,0 +1,31 @@
#!/bin/python
import requests
import datetime
from sys import argv
now = datetime.datetime.now()
year, month, day = now.year, now.month, now.day
hour, minute, second = now.hour, now.minute, now.second
if month < 10:
month = str('0' + str(month))
if day < 10:
day = str('0' + str(day))
if hour < 10:
hour = str('0' + str(hour))
if minute < 10:
minute = str('0' + str(minute))
if second < 10:
second = str('0' + str(second))
response = requests.get("http://10.3.141.94/capture")
filename = str(year) + str(month) + str(day) + '-' + str(hour) + str(minute) + str(second) + '.jpg'
file = open(filename, "wb")
file.write(response.content)
file.close()
if len(argv) > 1:
print(filename + ' saved')