In my project, I am using a flex sensor for detecting the bending of the finger to control the foot pedal. A flex sensor is a variable resistor and we need to convert the resistor value to a proportional voltage output to read it using a microcontroller…