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.
Step 1:
Step 2: Parts
For this project you will need:
- A Ribbon Sensor
- Arduino Uno/Genuino
- Some Jumpers
- A Breadboard
- 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:
- 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.
- 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 }

Participated in the
Explore Science Contest 2017

Participated in the
Makerspace Contest 2017
Comments