Force Sensitive Resistor for Arduino Projects
The harder the force, the lower the resistance
SKU: TA0255
Force Sensitive Resistor for Arduino
The harder the force, the lower the resistance
This is a force sensitive resistor with a round, 0.5" diameter, sensing area. This FSR will vary its resistance depending on how much pressure is being applied to the sensing area. The harder the force, the lower the resistance.
3 Month Warranty
Below is how to use an FSR - Force Sensitive Resistor with Arduino to fade an LED. This sensor is a variable resistor just like a photocell or flex sensor. The resistance changes by applying pressure on it.
Step 1: What You Will Need
For this tutorial you will need:
- Arduino uno
- Breadboard
- Force sensitive resistor
- LED
- 10KOhm & 220 Ohm resistors
See the image above for wiring connections with the breadboard circuit schematic.
Step 3: The Code
Below is the code using Codebender!
Try downloading the Codebender plugin and clicking on the "Run on Arduino" button to program your Arduino board with this sketch. And that's it, you've programmed your Arduino with this sketch.
How it works:
- Read analog value from flex sensor
:: value=analogRead(sensorPin);
- Map analog values 0-1023 to PWM values 0-255
:: value = map(value, 0, 1023, 0, 255);
- Send pwm value to led
:: analogWrite(ledPin, value);
You can make your own modifications to the code by clicking the "Edit" button.
Step 4: Well Done!
SKU | TA0255 |
Barcode # | 9351634004287 |
Brand | iduino |
Shipping Weight | 0.0200kg |
Shipping Width | 0.140m |
Shipping Height | 0.020m |
Shipping Length | 0.090m |
Shipping Cubic | 0.000252000m3 |
Unit Of Measure | ea |
Be The First To Review This Product!
Help other Aus Electronics Direct users shop smarter by writing reviews for products you have purchased.