Page 1
Introduction 3.3V 5.0V Analog The Grove - Loudness Sensor is designed to detect the loudness of environmental sound. Based on amplifier LM2904 and a built-in microphone, it amplifies and filters the high frequency signal that received from the microphone, and outputs a positive envelop.
Page 2
At last, you’ll get the analog-to-digital conversion value. Let’s try to read the output value. • As the picture on the below indicates, the Loudness sensor is connected to analog port A0 of the Grove - Base Shield. • Connect Arduino/Seeeduino to PC by using a USB cable.
Page 3
• Copy and paste code below to a new Arduino sketch. int val; void setup() Serial.begin(9600); void loop() analogRead(0); delay(10); val = analogRead(0); Serial.println(val); delay(200); • Upload the code. • Then open the serial monitor to observe the output results. There will be a significant change when blow to the sensor.
Page 4
Speaking to the sensor: With Raspberry Pi 1.You should have a raspberry pi and a grovepi or grovepi+. 2.You should have completed configuring the development enviroment, otherwise follow here. 3.Connection • Plug the sensor to grovepi socket A0 by using a grove cable.
Page 5
• To see the code nano grove_loudness_sensor.py # "Ctrl+x" to exit # 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 =", sensor_value...
Need help?
Do you have a question about the Grove and is the answer not in the manual?
Questions and answers