Use two GPIO pins, alternate between input and output mode
Discharge the capacitor
Charge one known resistor
Charge the UNKNOWN resistor (the sensor)
Use GPIO as input mode to detect the charge up reaching theshold (about mid point voltage)
This technique allow simple low cost MCU without build in ADC to read analogue sensor (variable resistance depending on sensed quality), including temperature (thermistor), humidity, light (CdS), force, etc.
Good absolute accuracy if the known resistor is high accuracy. Tolerance of capacitor is cancel out.
Widely used in consumer electronics device. Have excellent resolution, can be up to 16 to 20 bits or so. Typical conversion time in range of 100ms. Faster conversion can be traded with smaller resolution. Can use MCU hardware timer.
Raspberry Pi (vs Arduino) has no build in ADC and this technique is often used.
One pin version, lower absolute accuracy as affected by capacitor tolerance.
Also, three pin version, use one pin for sensing (input mode) and quick discharge (output), for quicker conversion time.