Running The Demo - SeeedStudio Grove Introduction

Loudness sensor
Hide thumbs Also See for Grove:
Table of Contents

Advertisement

4.Navigate to the demos' directory:
cd yourpath/GrovePi/Software/Python/
To see the code
nano grove_loudness_sensor.py
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
time.sleep(.5)
except IOError:
print "Error"
5.Run the demo.
sudo python grove_loudness_sensor.py
# "Ctrl+x" to exit #

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

Table of Contents