Send update to server
This commit is contained in:
parent
6fff9aca18
commit
61f76caa37
1 changed files with 3 additions and 0 deletions
|
@ -9,6 +9,7 @@ import time
|
||||||
import os
|
import os
|
||||||
from si_prefix import si_format
|
from si_prefix import si_format
|
||||||
import Adafruit_CharLCD as LCD
|
import Adafruit_CharLCD as LCD
|
||||||
|
import urllib2
|
||||||
|
|
||||||
# Set FPS (though RPi is probably to slow to meet it ;-)
|
# Set FPS (though RPi is probably to slow to meet it ;-)
|
||||||
FPS = 1.0
|
FPS = 1.0
|
||||||
|
@ -98,6 +99,8 @@ while True:
|
||||||
log.write("{},{},{}".format(time.time(), len(faces), int(totalUse)))
|
log.write("{},{},{}".format(time.time(), len(faces), int(totalUse)))
|
||||||
log.flush()
|
log.flush()
|
||||||
|
|
||||||
|
content = urllib2.urlopen("https://artstats.rubenvandeven.com/artwork1/views.php?time=%d&count=%d&total=%d" % (int(time.time()), len(faces), int(totalUse)) ).read()
|
||||||
|
|
||||||
os.fsync(log.fileno())
|
os.fsync(log.fileno())
|
||||||
|
|
||||||
if len(faces) < 1 and end - lastFaceTime > dimTimeDelta:
|
if len(faces) < 1 and end - lastFaceTime > dimTimeDelta:
|
||||||
|
|
Loading…
Reference in a new issue