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