Software; Faq - SeeedStudio Grove Loudness Sensor Manual

Table of Contents

Advertisement

Software

Step 1. Follow
Setting Software
to configure the development environment.
Step 2. Git clone the Github repository.
cd ~
git clone https://github.com/DexterInd/GrovePi.git
Step 3. Excute below commands to monitor the loudness.
cd ~/GrovePi/Software/Python
python grove_loudness_sensor.py
Here is the grove_loudness_sensor.py code.
import
time
import
grovepi
# Connect the Grove Loudness Sensor to analog port A0
# SIG,NC,VCC,GND
loudness_sensor =
0
while
True:
try:
# Read the sound level
sensor_value = grovepi.analogRead(loudness_sensor)
print("sensor_value = %d"
%sensor_value)
time.sleep(.5)
except
IOError:
print
("Error")
Step 4. We will see the loudness status as below.
pi@raspberrypi:~/GrovePi/Software/Python
sensor_value =
135
sensor_value =
23
sensor_value =
196
sensor_value =
258
sensor_value =
98
sensor_value =
131

FAQ

Q1: What is the difference between Grove-Loudness sensor and Grove - Sound Sensor?
A1: The Grove-Loudness sensor have screw potentiometer to adjust the output gain.
Schematic Online Viewer
$
python grove_loudness_sensor.py

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Grove Loudness Sensor and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents