Virtual Circuits
A Virtual Circuit is a circuit in an OOPic that appears to be a physical discrete electronic circuit, but is actually the OOPic operating system emulating the functionality of the circuit.
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 example

Let 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.

Objects Used:
oDIO1 An Object that provides a 1 bit digital I/O.
oGate An Object that provides logic-gate functions.
Schematic:

Click HERE for Example Code

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


How to construct a Virtual Circuit Servo Controller.

See the OOPic Programming Guide's Chapter 9, "Virtual Circuits" for more information.

    Send mail and comments to: Savage Innovations.