| Create a new instance of each
Object needed with the DIM command, specifying a
meaningful name for each Object instance. |
Dim
Button1 As New oDIO1
Dim Button2
As New oDIO1
Dim RedLed As
New oDIO1
Dim AndGate
As New oGate(2)
|
| Specify which I/O lines each of
the Objects will use and specify which Objects
are inputs and which are outputs by assigning
values to Object properties. |
Button1.IOLine =
1:
Button1.Direction
= cvInput
Button2.IOLine
= 2:
Button2.Direction
= cvInput
RedLed.IOLine
= 3:
RedLed.Direction
= cvOutput |
| Assemble the Virtual Circuit by
Connect the Objects together using the Link
method. |
AndGate.Input1.Link(Button1.Value)
AndGate.Input2.Link(Button2.Value)
AndGate.Output.Link(RedLed.Value)
|
Our program can now go do other things while the
RedLed object is continuously updated.
This screen shot shows this virtual
circuit program typed into the OOPic Development
Software. |
NOTE: The "Virtual Circuit" your program
defines within the OOPic operates at an average speed of
100,000 operations per second..
|