I'm trying to connect a Joystick/Encoder/Button (Copal Electronics CJ25) to a Raspberry PI. Using gpiotest I managed to get it up and running pretty well - using 3.3V input (though the data sheet mentions 5V).
The problem is, that each of the joystick's axes has 3 levels of voltage as output. 0x, 0.5x and 1x input voltage. So with 3.3V input there's 0V, ~1.7V, 3.3V.
Is there a way to simply step up/down voltage (resistors?), so that by using two different GPIOs I can detect all three states with those digital I/Os ?