Everyone --
I have just received my first ooPIC (ooPic-R) and I must say that I'm
impressed so far. I do have a question, however, on how to approach a
problem using Virtual Circuits (assuming this is the better that
Do-While, etc.)
I would like to make the buzzer on the ooPic-R beep every second (so
I've surmised that I need to incorporate the ooPic.Hz1 value) when my
motor is reversing (i.e. the servo position value is less that 32). I
think there is some math in there (less than) as well as the
conversion of a value (servo position) to a logic value. Any input or
general direction that could be given would be greatly appreciated, as
I'm still trying to understand the innerworkings of the virtual
circuits. I come from a VBA backround and use For/Next loops along
with If loops, but my understanding is that that is less than ideal on
the ooPic. Thanks in advance...
Jonathan
------------------------------------

(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )
I would create a wire to copy the OOPic.Hz1 value to an output (to
buzzer) and then set the operate value of the wire to either true or
false whenever the servo position is changed.
Another option is to use the oCompare object and set the input to
the servo position value and then copy the Below property to the
wire.operate property (from above). This would do the same thing
with fewer code lines (which are very slow to execute) but would
require more object memory space. You have to decide which is more
important to you.
--- In o...@yahoogroups.com, "calpolyjdk"
wrote:
>
> Everyone --
>
> I have just received my first ooPIC (ooPic-R) and I must say that
I'm
> impressed so far. I do have a question, however, on how to
approach a
> problem using Virtual Circuits (assuming this is the better that
> Do-While, etc.)
>
> I would like to make the buzzer on the ooPic-R beep every second
(so
> I've surmised that I need to incorporate the ooPic.Hz1 value) when
my
> motor is reversing (i.e. the servo position value is less that
32). I
> think there is some math in there (less than) as well as the
> conversion of a value (servo position) to a logic value. Any
input or
> general direction that could be given would be greatly
appreciated, as
> I'm still trying to understand the innerworkings of the virtual
> circuits. I come from a VBA backround and use For/Next loops along
> with If loops, but my understanding is that that is less than
ideal on
> the ooPic. Thanks in advance...
>
> Jonathan
>
------------------------------------

(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )