Esempio n. 1
0
 def initCountly(self, thread_size):
     global countly
     countly = Countly("API_URL", "APP_KEY", thread_size, str(sp(Window.width)) + "+" + str(sp(Window.height)))
Esempio n. 2
0
import threading

import grovepi

from common.Countly import Countly

temperature_sensor = 1
light_sensor = 0

countly = Countly("SERVER_URL", "APP_KEY", 0)


def grove():
    threading.Timer(30, grove).start()
    countly.event('Temperature', grovepi.temp(temperature_sensor, '1.1'))
    countly.event("Light", int(grovepi.analogRead(light_sensor) / 10.24))


grove()
Esempio n. 3
0
import sys
import os.path

sys.path.append(os.path.join(os.path.dirname(__file__), '../..'))

from common.Countly import Countly

temperature = 30
light = 50

countly = Countly("SERVER_URL", "APP_KEY", 5)
countly.event('Temperature', temperature)
countly.event("Light", light)
 def initCountly(self, thread_size):
     global countly
     countly = Countly("API_URL", "APP_KEY", thread_size, str(screen_resolution.width()) + "x" + str(screen_resolution.height()))
 def initCountly(self, thread_size):
     global countly
     countly = Countly(
         "API_URL", "APP_KEY", thread_size,
         str(gtk.gdk.screen_width()) + "x" + str(gtk.gdk.screen_height()))
import grovepi

from common.Countly import Countly

temperature_sensor = 1
light_sensor = 0

countly = Countly("SERVER_URL", "APP_KEY", 5)
countly.event('Temperature', grovepi.temp(temperature_sensor, '1.1'))
countly.event("Light", int(grovepi.analogRead(light_sensor) / 10.24))
from common.Countly import Countly

temperature = 30
light=50

countly = Countly("SERVER_URL", "APP_KEY", 5)
countly.event('Temperature', temperature)
countly.event("Light", light)
import sys
import os.path

sys.path.append(os.path.join(os.path.dirname(__file__), '../..'))

import grovepi

from common.Countly import Countly

temperature_sensor = 1
light_sensor = 0

countly = Countly("SERVER_URL", "APP_KEY", 5)
countly.event('Temperature', grovepi.temp(temperature_sensor,'1.1'))
countly.event("Light", int(grovepi.analogRead(light_sensor)/10.24))