mirror of
https://github.com/NotAShelf/air-quality-monitor.git
synced 2024-11-26 15:16:49 +00:00
get serial device from environment
This commit is contained in:
parent
bc09a7f43f
commit
7a978853a8
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ redis_client = redis.StrictRedis(host=os.environ.get('REDIS_HOST'), port=6379, d
|
||||||
class AirQualityMonitor():
|
class AirQualityMonitor():
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.ser = serial.Serial('/dev/ttyUSB0')
|
self.ser = serial.Serial(os.environ.get('SERIAL_DEVICE','/dev/ttyUSB0'))
|
||||||
|
|
||||||
def get_measurement(self):
|
def get_measurement(self):
|
||||||
self.data = []
|
self.data = []
|
||||||
|
|
Loading…
Reference in a new issue