What type of device responds to mechanical energy by changing its resistance when under tension or compression?
a) Reed switch
b) Strain gauge
c) Hall effect sensor
d) Servo motor