示例#1
0
def getSensorData(sensorId):
    sensor = function.getSensor(int(sensorId))
    sensorData = json.loads(sensor)
    sensorName = sensorData['name']

    fileName = sensorName + sensorId
    sensorData_ = function.file("/home/pi/Desktop/Flow_sensor/json/" +
                                fileName + ".json")
    return sensorData_
示例#2
0
def pinSensorId(pin):
    sensor = function.getSensor(int(pin))

    return sensor
示例#3
0
def getSensor(sensorId):

    sensor_ = function.getSensor(int(sensorId))

    return sensor_