|
| Virtual Circuits are created by progmatically linking
together a set of OOPic Objects in the same methodology
as one would physically link together a set of electronic
components. Once created, each individual part of the
virtual circuit can be manipulated or evaluated by the
program providing total computerized control of the
entire circuit. A wide variety of Objects are available for you to use in the construction of Virtual Circuits; A Virtual Circuit exampleLet us assume that we need a light to continuously turn on when two switched are pressed and then back off when either of the two switches is released. Here are two different ways to handle that in your program. Method 1. Using Virtual Circuit.In your program, connect a oGate Object's inputs to two oDio1 Objects that are reading two switches and connect the oGate Object's output to a third oDio1 Object that is controlling the light. Define the oGate as a 2-input "OR" gate.
Method 2. Polling without a Virtual Circuit.In you program flow, every so often, check to see if the two switches are pressed. If they are, turn the light on. If they are not, turn the light off. Be sure your program branches to this routine often. Click for Example Code
See the OOPic Programming Guide's Chapter 9, "Virtual Circuits" for more information. |
||||
| Send mail and comments to: Savage Innovations. |