Using keyboard input for BS2
agentile
Posts: 101
Hello,
· I would like to know if there is a way to·interface my BS2 to my computer so that I can have the BS2 read input from the computer's keyboard while a program is running.· Is there a command for reading the computer's keyboard?
thanks,
agentile·
· I would like to know if there is a way to·interface my BS2 to my computer so that I can have the BS2 read input from the computer's keyboard while a program is running.· Is there a command for reading the computer's keyboard?
thanks,
agentile·
Comments
SEROUT 16, baud, [noparse][[/noparse]"Enter command", cr]
debugin com·· 'Type an A
The debug screen will say
Enter command
A
If you want to send a string to the debug screen declare
serstring var· byte(8)
Then instead of debugin write:
SERIN 16. baud, [noparse][[/noparse]serstring\8]
You willl have to enter 8 characters - no more, no less.
For more info see the Help file.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Do you have a Stamp Tester yet?
http://hometown.aol.com/newzed/index.html
·
· Thank you.· This is excellent.· What I want to do is to use the BS2 as a calculator using the keyboard as an input.· This project is intended to demonstrate·the limitations of non-floating point arithmetic, and also to·underline the importance of·accurately sizing variables.· Anyway, since we are only entering numbers and operators (single characters), it seems that with a little manipulation of the inputs, this project will work out well.· Thanks again.
agentile
P.S. Do you know of·any examples of this type of code available in the archives?
How about interfacing to a SVGA monitor (The closest think I have is the SX video module which is pretty cool in itself) - but I am guesing this would require much more hardware (e.g. video card interfacing that may be too much for a single BS2 chip).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Some people have kicked around the idea of a svga monitor driver, but I haven't seen someone discuss completing the project.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·1+1=10
If you can find an old UNIX SUN-workstation keyboard, the output is RS232 (5V levels) 1200 baud.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.