fork
This commit is contained in:
12
example.py
Normal file
12
example.py
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/env python
|
||||
import time
|
||||
from datetime import datetime
|
||||
|
||||
from CO2Meter import *
|
||||
|
||||
Meter = CO2Meter("/dev/hidraw0")
|
||||
while True:
|
||||
measurement = Meter.get_data()
|
||||
measurement.update({'timestamp': datetime.now()})
|
||||
print(measurement)
|
||||
time.sleep(5)
|
||||
Reference in New Issue
Block a user