This sounds much more impressive then it is. Just to make it more interesting, I use the joystick to control a couple of servos. Soon enough I will hook this up to one of the pan and tilt platforms I built previously.
Building a automated airsoft turret is the current project on the front burner. Since I ended up spending most of the evening dealing with someone who hacked my paypal and ebay accounts, I didn’t have the time I had hoped.
Still I wanted to control a set of servos from a joystick. After looking at the various
options, I decided the easiest way to do it would be to use an old PC Joystick (with the old style gameport connector) You can basically think about this as a two axis pot with a couple of buttons that connect to ground. Feed the two pot outputs into analog inputs on your microprocessor and feed the switches to a couple of digital inputs and you are ready to go. There was a reason the at the joystick was in the junk drawer(namely that one of the pots was way out of center) instead of opening up the joystick, I just fixed it in software.
To get really fancy I could use a picaxe 14m to turn create a serial interface so that the 14m outputs 3 bytes which are the x pot, ypot and button states. This lets you turn the joystick into a 1 wire device. Kinda silly, but if you don’t have 2 analog and 2 digital inputs to spare it could be handy.
There is an excellent site on the old PC joysticks at :raji