Commit | Line | Data |
---|---|---|
1 | #!/usr/bin/env python | |
2 | ||
3 | import time | |
4 | from enviroplus import gas | |
5 | ||
6 | print("""gas.py - Print readings from the MICS6814 Gas sensor. | |
7 | ||
8 | Press Ctrl+C to exit! | |
9 | ||
10 | """) | |
11 | ||
12 | try: | |
13 | while True: | |
14 | readings = gas.read_all() | |
15 | print(readings) | |
16 | time.sleep(1.0) | |
17 | except KeyboardInterrupt: | |
18 | pass |