January 05, 2020
Adafruit Square Force-Sensitive Resistor makes it really easy to detect the amount of force by returning a int value from 0 to 1023. This is a great sensor but it does not provide where on the sensor was pressed.
Time to connect the sensor to Arduino:
Now you are able to use the following snippet of code to determine the amount of force.
// Force Sensor Right -> 5V
// Force Sensor Left -> ((100k ohm && A0 )-> GND)
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println(analogRead(1));
}