16 October, 2009

Serial Port Magic vol.3 (controlling pins)

Data is not the only thing that can go through serial port. Actually serial port can output some currency (3.. 12V or -3.. 12V) - getting interesting, hah! To look it a little closer you probably need multimeter to measure currency coming out of serial port pins.

I'm not going into detail to tell you what this and this pin is for. I have chosen DTR (Data Terminal Ready, nr.4) pin to play with - just look it up from picture. And you also have to look for Signal Ground - pin nr. 5. Those are the pins you're going to user to measure currency. For my Mac it is -6.3V. To change it to 6.3V you need couple of lines of code and to compile it. Now from command line just run
> ./setSerialSignal /dev/tty.usbserial 1 0
and the you go again. I haven't yet figured out how to use it, but thats a start all right.

No comments: