You could use the POT command, RC TIME, or an ADC.
When the resistance changes the value from either one will change. The resolution the ADC is set at will determine the value given, The capacitor used with POT will determine the value.