Code for keyboard imput.
innovator
Posts: 2
Hello:
· I'm new in this adventure and I would like to know if a comand exists to perform the following: If a debug is used to ask for a number, what command can be used to retrieve information from the keyboard? and to usethat input to perform basic math function? I'm using a BOE·BS2 RevC.
Thanks.· Please reply to h.pagan@ieee.org or here.
Post Edited By Moderator (Chris Savage (Parallax)) : 6/9/2005 7:49:31 PM GMT
· I'm new in this adventure and I would like to know if a comand exists to perform the following: If a debug is used to ask for a number, what command can be used to retrieve information from the keyboard? and to usethat input to perform basic math function? I'm using a BOE·BS2 RevC.
Thanks.· Please reply to h.pagan@ieee.org or here.
Post Edited By Moderator (Chris Savage (Parallax)) : 6/9/2005 7:49:31 PM GMT
Comments
' {$STAMP BS2}
' {$PBASIC 2.5}
aNum··· VAR···· Byte
Main:
· DEBUGIN DEC1 aNum
· DO WHILE (aNum > 0)
··· DEBUG "*"
··· aNum = aNum - 1
· LOOP
· DEBUG CR
· GOTO Main
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Or, in the PBasic IDE, the "New Debug" icon (looks like a chip with a magnifying glass over it) can provide the interface.
As soon as I finish my little project I'll get back to you.
pd. wow that was a fast answer