1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
pi
@raspberrypi
:~
$
grove_air_quality_sensor_v1_3
0
1
Detecting ...
62
, Air Quality OK.
63
, Air Quality OK.
61
, Air Quality OK.
61
, Air Quality OK.
59
, Air Quality OK.
62
, Air Quality OK.
60
, Air Quality OK.
60
, Air Quality OK.
59
, Air Quality OK.
60
, Air Quality OK.
60
, Air Quality OK.
60
, Air Quality OK.
57
, Air Quality OK.
^CTraceback (most recent call last):
File
"/usr/local/bin/grove_air_quality_sensor_v1_3"
, line
11
, in <module>
load_entry_point(
'grove.py==0.5'
,
'console_scripts'
,
'grove_air_quality_sensor_v1_3'
)()
File
"/usr/local/lib/python3.5/dist-
packages/grove/grove_air_quality_sensor_v1_3.py"
, line
68
, in main
time.sleep(.
1
)
KeyboardInterrupt
You can use this sensor to detect the air quality. Press
Ctrl
+
C
to quit.
Notice
You may have noticed that for the analog port, the silkscreen pin number is something like
A1, A0
, however in the command we use
parameter
0
and
1
, just the same as digital port. So please make sure you plug the module into the correct port, otherwise there may be pin
conflicts.
I2C
We will take the
Grove - OLED Display 128x64
for example to introduce the I2C port.
Hardware connection diagram