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