A Novel Method for Measurement of Linear Displacement by Using Extension Spring and Flex Sensor