projects
/
EVA-2020-02-2.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
8717922cdfc9d4122d2e501f64c6e67f35dbb89c
[EVA-2020-02-2.git]
/
examples
/
gas.py
1
#!/usr/bin/env python
2
3
import
time
4
from
enviroplus
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