Tuesday, October 13, 2009

Hacking an old joystick for data input - pygame

Having switched to a different computer (1.2 megahertz cpu) from which to run Ubuntu and python 2.5 I lost my parallel port capability, where I had hoped to read potentiometer values for data input. However, by pulling the board out of an old Interact joystick (USB) and using pyame, I can easily read resistance changes in the pots through the USB port, which is okay too. The idea is to sense light passing through film sprocket holes to ascertain film position relative to the dragging pin (which pulls the film along). I've played with a UV diode pulled from an old VCR and the sensor varies its resistance when exposed to the UV light. I hopes to simply place this sensor in series with the potentiometer now in the joystick circuit.

No comments:

Post a Comment