Timing based Analog to Digital Convertor.
The basic idea is to time how long it takes to charge a capacitor.
This technique was used in the original Pong game.
Woz also used this approach in the Apple 1.
1.A 2N7000 mosfet to discharge the capacitor. Setting GPIO_3 to 1 turns on the mosfet and discharges the capacitor.