Code to read a resistive Gear Position Sensor (GPS) and output the current gear position to either a Seven Segment display or an 8x8 Dot Matrix.
In both versions the resistance is read between common ground and each of the red & blue wires.
The seven segment version displays to a single digit seven segment display.
A prototype can be seen below:
The dot matrix version displays to a single digit or character to an 8x8 dot matrix display.
The final circuit schematic can be seen below.
The GPS corresponding values & Dot Matrix illumination positions: