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 oopic@yahoogroups.com, "calpolyjdk" <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
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/oopic/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/oopic/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
No comments:
Post a Comment