Sign in

username:

password:



Not a member?

Search oopic



Search tips

Subscribe to oopic



Ads

Discussion Groups

Discussion Groups | | okeypad2 Experiemental Code

okeypad2 Experiemental Code - carr6565 - Aug 28 20:43:49 2008

So here is what I came up with. Any critical thought would be
appreciated before I put this together and see if it works.

Dim buttons As New oKeypad2
Dim servoE As New oServo

Sub Main()

ooPIC.Delay = 500

buttons.RowMask = &B11110000
buttons.ColMask = &B00001111
buttons.IOGroup = 1
buttons.Operate = 1

servoE.IOLine = 17
servoE.Center = 22
servoE.Operate = cvTrue
servoE.Position = 5

End Sub

If buttons.Key = 0 Then
servoE.Position = 60

If buttons.Key = 1 Then
servoE.Position = 50

If buttons.Key = 2 Then
servoE.Position = 40

If buttons.Key = 3 Then
servoE.Position = 30

If buttons.Key = 4 Then
servoE.Position = 20

If buttons.Key = 5 Then
servoE.Position = 10
End If

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



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )


RE: okeypad2 Experiemental Code - Dave Warner - Aug 29 14:12:38 2008



Dave W. I'm still alive!
> To: o...@yahoogroups.com> From: c...@gmail.com> Date: Fri, 29 Aug 2008 00:43:40 +0000> Subject: [oopic] okeypad2 Experiemental Code> > So here is what I came up with. Any critical thought would be> appreciated before I put this together and see if it works.> > Dim buttons As New oKeypad2> Dim servoE As New oServo> > Sub Main()> > ooPIC.Delay = 500> > buttons.RowMask = &B11110000> buttons.ColMask = &B00001111> buttons.IOGroup = 1> buttons.Operate = 1> > servoE.IOLine = 17> servoE.Center = 22> servoE.Operate = cvTrue> servoE.Position = 5> > End Sub
http://www.windowslive.com/explore/photogallery/posts?ocid=TXT_TAGLM_WL_Photo_Gallery_082008

[Non-text portions of this message have been removed]
------------------------------------



(You need to be a member of oopic -- send a blank email to oopic-subscribe@yahoogroups.com )