Ejemplo n.º 1
0
 def initialize(self):
     sensors.initSensors()
Ejemplo n.º 2
0
import sensors
import time

sensors.initSensors()

sensors.setRampAngle(0)
time.sleep(3)
sensors.setRampAngle(60)
time.sleep(60)

sensors.shutdown()
Ejemplo n.º 3
0
@author: samaltesen
"""

import random
import time
import datetime as dt
import sys
import sensors as s
from iotClient import *
from grove_rgb_lcd import *
import grovepi
import math
import json
import logging

s.initSensors()

MESSAGE_COUNT = 0
client = 0
lastSentTime = dt.datetime.now()
maxSentTime = 60
numberOfSensors = 5
tmp = 0
twinCallback = ""

for sensor in s.sensor:
    sensor['timestamp'] = dt.datetime.utcnow()


def checkDelta(sensor):
    if abs(sensor['sample'] - sensor['sendValue']) > sensor['delta']: