Force sensor (FSR) with TinkerPie
Squeeze it: pressure pads, smart chairs, drum pads.
| Type | Analog sensors |
|---|---|
| Connect to | P10-P13 |
| Gives | 0-100 % |
| Simulator | Yes: a control appears under the simulated board |
How it works
A force-sensitive resistor (FSR) is a thin pad whose resistance drops when it is pressed. The module turns that into a voltage, so harder presses give higher numbers.
How to wire it
Plug the module's A0 / OUT into P10 (or P11-P13 when Wi-Fi is off), VCC to 3.3 V, GND to GND.
Code
In blocks: Accessories category in TinkerPie Studio. As code:
// JavaScript
sensors.forceSensor(Pin.P10)
// Arduino C++
sensors::forceSensor(Pin::P10) Good to know
- Great for detecting presses and squeezes, not for exact weights.
- Readings change a little with the same press, so use thresholds.
- Do not bend the pad near its pins.
Similar modules
- Potentiometer (knob)
- Soil moisture sensor
- Light sensor module (LDR)
- Sound sensor module
- Gas / smoke sensor MQ-2
- Air quality sensor MQ-135
- Rain drop sensor
- Water level sensor
More projects to try
Questions
Can I try the Force sensor (FSR) without buying one?
Yes. In TinkerPie Studio the simulator shows a control for it under the board, so you can test your program before you build it.
Can I build a kitchen scale with an FSR?
It can show more or less pressure, but it is not accurate enough for grams. For real weights, engineers use a load cell with an HX711 amplifier.