wire1.Operate = cvTrue : You have to turn processing objects on.
DLC
carson hoyt wrote:
> So yeah I have no idea why but the button isn't working, is it the code or should I start checking I/O lines for damage? Here is the updated code.
>
> ooPIC.Delay = 500
>
> Dim servo1 As New oServo
> Dim button1 As New oDIO1
> Dim wire1 As New oWire
> Dim positionchange1 As New oEvent
>
> Sub Main()
>
> servo1.IOLine = 31
> servo1.Center = 21
> servo1.Operate = cvTrue
> servo1 = 21
>
> button1.IOLine = 8
> button1.Direction = cvInput
>
> wire1.Input.
> wire1.Output1.
>
> End Sub
>
> Sub positionchange1_
>
> servo1 = 50
>
> End Sub
>
> Andrew Porrett <slicerwizard@
> >Sub positionchange1_
> > > >
> > > > Do
> > > > servo1.Position = 35
> > > >
> > > > Loop
> > > > End Sub
> >
> > >An event handler that loops forever - so does your OOPic just lock up
> > >when it gets here? Why do you want to loop here?
> >Well I want the servo to maintain its position until another button
> >is pressed. I was going to have seperate events for each button.
>
> servo.position = x (or servo = x, IIRC) will move the servo to
> position x and the servo will maintain that position until you tell
> it to move to some other position, so the do loop serves no purpose.
>
> >How would you go about it?
>
> I'd take out the do loop.
>
> > This is the first program I have ever attempted to write so I'm
> > sure it sucks and everything.
>
> Sucks? Naw, you haven't seen some of the doozies that've graced this
> forum. :)
>
> > Am I at least using the right objects?
>
> Looks good to me. Add your other button(s) and event handler(s).
>
> ...Andy
>
>
>
>
>
>
> ------------
> Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us.
>
> [Non-text portions of this message have been removed]
>
>
>
>
> Yahoo! Groups Links
>
>
>
--
------------
Dennis Clark ooPIC Tech Support
www.oopic.com
------------
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch format to Traditional
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___
No comments:
Post a Comment