EasyManua.ls Logo

SeeedStudio Grove - Introduction

SeeedStudio Grove
5 pages
Print Icon
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
4.Navigate to the demos’ directory:
cd yourpath/GrovePi/Software/Python/
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
time.sleep(.5)
except IOError:
print "Error"
5.Run the demo.
sudo python grove_loudness_sensor.py

Other manuals for SeeedStudio Grove

Related product manuals