if sensor_value > 500:
grovepi.digitalWrite(led,1)
else:
grovepi.digitalWrite(led,0)
print "sensor_value =", sensor_value
except IOError:
print "Error"
5.Run the demo.
sudo python grove_slide_potentiometer.py
Related Projects
The best way to learn something, is to create a project with it.
is a place which gathers a lot of amazing projects with step-by-
step tutorials. Makers in the community have made a lot of awesome projects with
the Grove - Slide Potentiometer, check this out!
Arduino BoomBox
Take an ordinary shoebox and convert it into an Arduino Boombox! DIY your own
MP3 player with Arduino Uno and our
. The Grove - Slide
Potentiometer is used for the volume control in this project.