6da2a65f9cbf3f1cb66ef5a33377413399871c3f
[EVA-2020-02-2.git] / examples / gas.py
1 #!/usr/bin/env python
2
3 import time
4 from envirophatplus import gas
5
6
7 print("""gas.py - Print readings from the MICS6812 Gas sensor.
8
9 Press Ctrl+C to exit!
10
11 """)
12
13 try:
14 while True:
15 readings = gas.read_all()
16 print(readings)
17 time.sleep(1.0)
18 except KeyboardInterrupt:
19 pass