Ribbon Sensor and Arduino

Introduction: Ribbon Sensor and Arduino

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

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1:

Step 2: 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

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 }

Makerspace Contest 2017

Participated in the
Makerspace Contest 2017

Explore Science Contest 2017

Participated in the
Explore Science Contest 2017

Be the First to Share

    Recommendations

    • Raspberry Pi Contest 2020

      Raspberry Pi Contest 2020
    • Wearables Contest

      Wearables Contest
    • Fix It Contest

      Fix It Contest

    Discussions