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:
No comments:
Post a Comment