projects
/
EVA-2020-02-2.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Merge branch 'master' of github.com:pimoroni/enviroplus-python
[EVA-2020-02-2.git]
/
examples
/
particulates.py
1
#!/usr/bin/env python
2
3
import
time
4
from
pms5003
import
PMS5003
5
6
print
(
"""particulates.py - Print readings from the PMS5003 particulate sensor.
7
8
Press Ctrl+C to exit!
9
10
"""
)
11
12
pms5003
=
PMS5003
()
13
time
.
sleep
(
1.0
)
14
15
try
:
16
while True
:
17
readings
=
pms5003
.
read
()
18
print
(
readings
)
19
time
.
sleep
(
1.0
)
20
except
KeyboardInterrupt
:
21
pass