Dim LED as new oDIO1
Dim Button as new oDIO1
Dim Wire as new oWire
Dim Evt as new oEvent
Sub Main()
OOPic.Delay = 500 ' always delay at startup
OOPIC.Node = 5 ' for debugging
OOPIC.PullUp = cvOn ' pull up IOLines 8..15 (inputs)
LED.IOLine = 7
LED.Direction = cvOutput
Button.IOLine = 8 ' use IOLines 8..15 as inputs (pull-ups)
Button.Direction = cvInput
Wire.Input.Link(Button)
Wire.Output.Link(Evt.Operate)
Wire.Operate = cvTrue
end sub
sub Evt_Code()
LED = cvOn
OOPic.Delay = 100
LED = cvOff
End Sub
It has 3 drawbacks: it is for the S board, it is written in Basic and
it doesn't use a tone.
It has only 1 positive attribute: it works.
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:
No comments:
Post a Comment