Arduino and Potentiometer

by KEAprojects in Circuits > Arduino

1389 Views, 31 Favorites, 0 Comments

Arduino and Potentiometer

5609a5804936d4715e00003c.jpeg

This instructable gives an example of how to use an Arduino and a potentiometer

Partlist

20150928_213048.jpg

  • Arduino UNO Board
  • Potentiometer
  • Base Shield
  • USB Cable
  • 4 Pin Grove Cable

Connect Everything

20150928_225047.jpg

  • Connect the 4 pin grove cable to the potentiometer to your base shield in pin A0.
  • Connect your base shield to the arduino board
  • Connect the USB cable to the arduino and a computer (Mac of course)

Download the Code Here

Downloads

Finish

Screen Shot 2015-09-28 at 22.26.09.png

Upload the file and open the serial monitor, it should look like the picture.

I´ve set the threshold to 400 you can change that if you want to.

If the potentiometer is below 400, the serial monitor will write a number followed by: brick REGISTERED: and how much below 400. The led on the arduino board will flash everytime the number is below 400

Try this yourself by adjusting the potentiometer

Good Luck!