Hey! This is a old java project that works together with a C extension to send signals to a computer parallel port and listen on a specific input. The input signal reads a flag from a ultrasonic sensor and other inputs to turn on a generic switch.
There area other functions written in java 1.5 to turn on a web camera, read a code and send Text message to some cellphone numbers.
Feel free to fork it and tweak it as much as you would like.