Tap the following command
sudo grove_pwm_buzzer
in the command line interface.
1
2
3
4
5
6
7
8
9
10
11
pi
@raspberrypi
:~
$
sudo grove_pwm_buzzer
Insert Grove-Buzzer to Grove-Base-Hat slot PWM[
12
13
VCC GND]
3800
3400
3000
2900
2550
2270
2000
exiting application
The buzzer will ring a few times and then stop, the program will automatically exit.
Digital Port
We will take the
Grove - Ultrasonic Ranger
for example to introduce the Digital port.
Hardware connection diagram
Tap the following command
grove_ultrasonic_ranger 5 6
in the command line interface.
1
2
3
4
5
6
pi
@raspberrypi
:~
$
grove_ultrasonic_ranger
5
6
Detecting distance...
6.979909436456088
cm
7.966469074117726
cm
12.451204760321255
cm
15.184797089675378
cm