Example #1
0
 def __init__(self, device, port):
     assert device in grove.keys(), device
     sensor_type = grove[device]
     assert sensor_type in grovepi.keys(), sensor_type
     assert port in grovepi[sensor_type].keys(), port
     self.device = device
     self.port = port
     self.pin = grovepi[sensor_type][port]
     self.units = units[device]
Example #2
0
 def get_sensors():
     return dumps(grove.keys())