Yeah, this is definitely hardware work, not OS stuff. Like skyking said, you would need to wire up a circuit of some sort on a breadboard or something, hook up to a hardware interface (serial port probably), and write a little program to control the circuit. If you're really serious about this, I'd check out sites like hardocp - they're more into this kind of thing than people around here.