I'm working on the thermistor-on-the-joystick-port trick that I discussed in another thread. What I'm trying to do is just put a thermistor on the X axis of the joystick port and read that.
When I put a real joystick on the port, my software reads the X axis correctly. But when I unplug the joystick and put the thermistor on the pins that would normally be the X axis potentiometer, the Windows API returns a "joystick is unplugged" error code when I call the function.
How does Windows decide whether a joystick is plugged in or not? Are there other pins I need to bridge or something?
(Note that this is an old-style 15-pin analog joystick port.)
Or maybe I'm putting the thermistor on the wrong pins, too. I'm using the X axis sense pin (pin 3) and the ground next to it (pin 4). Am I supposed to connect it to +5vdc and the X axis pin instead of ground and X axis?
I used to know this stuff by heart, once upon a time, when I'd build joysticks from scratch to make things like homemade steering wheel controllers. It's been so long since I've done it though.