i dont know VB, i would do it in C++ using the paralel port, for wich you will need a paralel port cable, for one bulb you would only ouse one bit so you just need 2 wires of the pararel cable, also, a register, a Flip-flop would do in this case, also you need a transistor for driving the relay wich drives the bulb. depending on the relay a Op Amp would do without the transitor or you can use both.
MiguelL
a transistor BC547,
a resister 4.7k ohms,
a relay coil (that doesnt draw more than 5 volts)
a diode 1N4002,
a small breadboard for the circuit,
AND software to give a hi/lo signal to your PC's parallel port's data pin.
Connections:
connect data pin of parallel port to resistor, and give the resistor to Base of transister.
ground the Emitter, and connect the relay's coil to collecter. use a free wheeling diode across the relay coil. use the +v pin of parallel port to drive the collector, or use an external source.
Control the parallel port using your software and....turn ON/OFF a bulb or a ROBOT, whatever you want by using the NO/NC contacts of the
relay. do not use the PC's power for these NO/NC contacts...use an external source.
> Connections:
> connect data pin of parallel port to resistor, and give the resistor to
> Base of transister.
> ground the Emitter, and connect the relay's coil to collecter. use a free
> wheeling diode across the relay coil.
The Coffee mini-howto has the circuit diagram for this, and also gives the pinout of the parallel port and so on. Look for it in /usr/doc/HOWTO/mini if you have Linux, or on the web if you don't.
Note that you'll have to convince your OS to let you access the port directly - this'll depend on the version of the OS.
first, u need to download a driver, namely win95io.dll.
Keep the file in your wondows system.
you can start writing program by searching related source code thru internet....
like
vbin 888 ' detect input
vbout 889,2 ' output to priter port