This Forum is Dedicated For all The Object Oriented PIC Lovers .......... The concept behind OOPic is straight forward. Use preprogrammed multitasking Objects from a library of highly optimized Objects to do all the work of interacting with the hardware. Then write small scripts in Basic, C, or Java syntax styles to control the Objects. During operation, the Objects run continuously and simultaneously in the background while the scripts run in the foreground telling the objects what to do.

Wednesday, January 16, 2008

[oopic] Re: oopic oEvent not working

--- In oopic@yahoogroups.com, "yokos2271" <yokos2271@...> wrote:
>
> In this sample code
>
> WIRE.Output.Link(LED.State) - works
> WIRE.Output.Link(BLINK.Operate) - not working
>
> oEvent its not working ?
> Guys have any idea whats wrong ?
> I use OOpic II+ c 1.1+ and OOPic II Expansion Card
> SUPERDROIDROBOTS.com:
> ///////////////////////////////////////code
> Dim WIRE As New oWire
> Dim LED As New oDIO1
> Dim Switch1 As New oDIO1
> Dim BLINK As New oEvent
>
> Sub Main()
> LED.IOLine = 20
> LED.Direction = cvOutput
> Switch1.IOLine = 12
> Switch1.Direction = cvInput
> WIRE.Input.Link( Switch1.State)
> // WIRE.Output.Link(BLINK.Operate) --- does not work
> WIRE.Output.Link(LED.State) --- works
> WIRE.Operate = cvTrue
> End Sub
> Sub BLINK_Code()
> LED.State = 1
> LED.State = 0
> LED.State = 1
> End Sub
>

If the event code did work, the LED would change state much faster
than your eye could follow. You might want to put a couple of
OOPIC.delay = 100 between the state changes.

Richard



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:

http://docs.yahoo.com/info/terms/

No comments: