First is the measurement of the FSR sensor range. I wrote down (10,800) this time to leave some spaces on both ends.

image.png

Add the servo library.

image.png

Then, declare which pin the servo was connected to:

image.png

image.png

Write down the sensor range mapping info:

image.png

The Servo motor is going between 0 degrees and 179 degrees.

The complete code:

image.png

WeChat_20240921165355.mp4