Sure you could do it, but I'm not sure anyone has written that program. In short, you could have your BASIC Stamp wait on a command, then process it. But ... you also have to deal with servos. So what you do is set the SERIN timeout to 20 ms and have the Timeout jump to the servo update routine.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Jon Williams
Applications Engineer, Parallax
Dallas Office
PBASIC is only available on the BASIC Stamp -- there is no PC version of PBASIC. You can use VB, or if RealBASIC (www.realbasic.com) which is only $100 and comes with serial control capabilities.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Jon Williams
Applications Engineer, Parallax
Dallas Office
You would create a program in VB that runs on your PC that "talks" to the BASIC Stamp -- which is running its own (PBASIC) program to accept and interpret the commands. Our RS-232 AppMod docs show how and includes a VB application demo.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Jon Williams
Applications Engineer, Parallax
Dallas Office
My son and I have a program that allows us to directly control the Boe-Bot from the debug screen.
The Boe-Bot does not have any connection on it other than the servos and the serial cable.
The Boe-Bot·interprets the numbers from the numeric·keypad to be forward/reverse/pivot left/pivot right/forward&right, etc...· It does not understand the arrow keys between the alpha keys and the numeric keypad.
Perhaps this is close to what you were looking for.
it is, but i cant get it to work. when i load the code into the bot, put it into EXEC (switch position 2) it doesnt do anything. do i need to do something else?
I'm writing this off the top of my head, and before I've had my morning Starbucks fix ... but I think this will work for you (I've used this type of code several times):
Here's how it works: DEBUGIN gets a character from the Debug Terminal window.· The character is compared to a valid list using LOOKDOWN, and if it's in that list cmd will be converted to the position when that character falls in the list (0 - 7).· If not in the list, then we loop back to the top to get another character.· If the character was valid, the new value of cmd is divided by two (because we used two characters for each command: uppercase and lowercase).· No it's a simple matter of calling the appropriate subroutine with ON-GOSUB.
Once you understand how this works you can easily expand the list.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔ Jon Williams Applications Engineer, Parallax
Dallas, TX· USA
i tried it with the "RETURN" in there, it didnt work. when i press the keys in debug, the TX and RX lights light up at the same time, but nothing happens to my servos. but eveything works when i just normaly program it
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
What language did you want to use on the PC to talk to the BS2? C++? VB?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
The Boe-Bot does not have any connection on it other than the servos and the serial cable.
The Boe-Bot·interprets the numbers from the numeric·keypad to be forward/reverse/pivot left/pivot right/forward&right, etc...· It does not understand the arrow keys between the alpha keys and the numeric keypad.
Perhaps this is close to what you were looking for.
Get_Command:
· DEBUGIN cmd
· LOOKDOWN cmd, [noparse][[/noparse]"fFbBlLrR], cmd
· IF (cmd > 7) THEN Get_Command
· cmd = cmd / 2
· ON cmd GOSUB Go_Fwd, Go_Back, Go_Left, Go_Right
· GOTO Get_Command
Here's how it works: DEBUGIN gets a character from the Debug Terminal window.· The character is compared to a valid list using LOOKDOWN, and if it's in that list cmd will be converted to the position when that character falls in the list (0 - 7).· If not in the list, then we loop back to the top to get another character.· If the character was valid, the new value of cmd is divided by two (because we used two characters for each command: uppercase and lowercase).· No it's a simple matter of calling the appropriate subroutine with ON-GOSUB.
Once you understand how this works you can easily expand the list.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
' {$PBASIC 2.5}
cmd··· VAR··· Byte
Get_Command:
· DEBUGIN cmd
· LOOKDOWN cmd, [noparse][[/noparse]"fFbBlLrR"], cmd
· IF (cmd > 7) THEN Get_Command
··· cmd = cmd / 2
· ON cmd GOSUB Go_Fwd, Go_Back, Go_Left, Go_Right
··· GOTO Get_Command
Go_FWD:
· PULSOUT 13, 850
· PULSOUT 12, 650
Go_Left:
··· PULSOUT 13, 650
··· PULSOUT 12, 650
Go_Right:
··· PULSOUT 13, 850
··· PULSOUT 12, 850
Go_Back:
··· PULSOUT 13, 650
··· PULSOUT 12, 850
thats all i could think of but it doesnt work. what do i need to change?
Post Edited (HavoKane) : 4/30/2005 7:24:46 PM GMT
I did test It but I have no BOE-Bot so I used debug
Micro
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas, TX· USA
How do I control through the COM port but have no wires
Or simply How do I make a Tx for the computer and a Rx for the stamp
Answering this could help the person who raised the question
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Hello