|
Re: Simulating a potentiometer
This may be too late to help.
If all you are looking to do is get three numeric values. According to the documentation no connection gives a 127. If it's a three position switch with off in the middle Wire the common to the Analog input pin. wire a 100K to the +5Vaux and to one side of the switch and then wire a small value resistor to the other side ( I calculated a value less than 100 ohms and I think the input should be able to be directly connected to +5v but I wouldn't tell you to do that until I had actually tried it myself. I'd try a 1K just to be safe and see what values you get.) also connected to +5Vaux.
So switched to the 100K you should get close to zero
switched off you take advantage of the system thinking the joystick is disconnected and get 127
and switched to the low value resistor it should give a 254.
I'll try shorting the input and see if that blows anything and let you know.
Steve
OK tried the spark test... no sparks and the port still operates normally. I thought it would. must be a high impedance input only reading voltage.
Last edited by Steve_Alaniz : 16-02-2008 at 14:57.
Reason: Additions
|