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.

Friday, April 11, 2008

[oopic] Re: Bizarre Occurrence

My test program:

Dim distRight As New oIRRange
Dim distLeft As New oIRRange
Dim distFront As New oIRRange
Dim mright As New oServoSP
Dim mleft As New oServoSP

Sub Main()
mright.IOLine=8
mright.Speed=0
mright.Operate=cvOn
mleft.Invert=cvTrue
mleft.IOLine=9
mleft.Speed=0
mleft.Operate=cvOn
distRight.IOLine=1
distRight.Operate=1
distLeft.IOLine=3
distLeft.Operate=1
distFront.IOLine=2
distFront.Operate=1

Do
mright.Speed=80
mleft.Speed=100
ooPIC.Delay=1000
If (distRight > 100)
ooPIC.Delay=300
mright.Speed=-80
mleft.Speed=100
ooPIC.Delay=700
ElseIf (distLeft > 100)
ooPIC.Delay=300
mleft.Speed=-100
mright.Speed=80
ooPIC.Delay=700
End If
Loop
End Sub


------------------------------------

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: