Introduction: Ribbon Sensor and Arduino

Picture of Ribbon Sensor and Arduino

Hello! Today I'm going to show you how make a digital slider with a softpot and an Arduino board.

Step 1:

Picture of

Step 2: Parts

Picture of Parts
For this project you will need:
  1. A Ribbon Sensor
  2. Arduino Uno/Genuino
  3. Some Jumpers
  4. A Breadboard
  5. A USB B Cable

If you want specifics on the sensor, here's the datasheet: https://cdn-shop.adafruit.com/datasheets/SoftPot-...

Step 3: The Project

Picture of The Project

Alright, so here's what you need to do:

  1. Plug your jumpers in to the 5v, Gnd and A0 on your arduino. Plug the ends of those jumpers in to your Arduino in to your breadboard. If you look at the soft pot, you'll notice the small arrow on one of the pins. That is the ground pin. the middle pin is for the A0 jumper and the last pin is for the 5v jumper.
  2. Now you have the circuit set up. Paste the code below in to the IDE and upload it to your board. The softpot should read between 0 and 1023, just like a normal potentiometer.

That's all folks! Thanks for reading and as always, Happy Making!

Here's the Code:

int softpotPin = A0; //analog pin 0
void setup(){ digitalWrite(softpotPin, HIGH); //enable pulp resistor

Serial.begin(9600); }

void loop(){ int softpotReading = analogRead(softpotPin);

Serial.println(softpotReading);

delay(250); //just here to slow down the output for easier reading }

Comments

About This Instructable

231views

6favorites

License:

More by DerpyCyclops:Mini Hovercraft W/ Arduino NanoUSB Mouse W/ Circuit PlaygroundIlluminati Backlight-Lamp
Add instructable to: