Boebot With Visual Studio 2005
coolmatt
Posts: 2
hi,
Is there anyway that i could get the boebot output(DEBUG command to work) while using visual studio 2005 ?
I wrote a boebot code to listen to the serial port and output it back to the serial port
'{$STAMP BS2}
' {$PBASIC 2.5}
inp VAR Byte
main:
n9600 CON 84
DO
SERIN 16,n9600,[noparse][[/noparse]inp] ' Baudmode for 9600 BPS inverted.
DEBUG inp
SEROUT 16,n9600,[noparse][[/noparse]inp] ' Print message
LOOP
After i tokenize it and store it in the boebot, i will use Visual studio 2005 (Visual c++) to connect to the boebot using serial port. And if DON'T use the DEBUG command, i am getting back the data which i sent.
It all works fine except that boebot complains that serial port is in use when it comes to the DEBUG command. Since both use COM1 port.
1) Is it possible for both visual C++ and DEBUG command to run on the same COM1 port , i mean i want the data to be output in the Stamp editor and use VC++?
2) Lets say the above is not possible, is there anyway for me to check the data (last transmitted data) to the boebot, means, lets say i disconnect (stop) visual C++, now how would i get the data that was transmitted to the boebot at first place, since i have to RE-tokenize the code and send it for the DEBUG command to become active.
Is there anyway that i could get the boebot output(DEBUG command to work) while using visual studio 2005 ?
I wrote a boebot code to listen to the serial port and output it back to the serial port
'{$STAMP BS2}
' {$PBASIC 2.5}
inp VAR Byte
main:
n9600 CON 84
DO
SERIN 16,n9600,[noparse][[/noparse]inp] ' Baudmode for 9600 BPS inverted.
DEBUG inp
SEROUT 16,n9600,[noparse][[/noparse]inp] ' Print message
LOOP
After i tokenize it and store it in the boebot, i will use Visual studio 2005 (Visual c++) to connect to the boebot using serial port. And if DON'T use the DEBUG command, i am getting back the data which i sent.
It all works fine except that boebot complains that serial port is in use when it comes to the DEBUG command. Since both use COM1 port.
1) Is it possible for both visual C++ and DEBUG command to run on the same COM1 port , i mean i want the data to be output in the Stamp editor and use VC++?
2) Lets say the above is not possible, is there anyway for me to check the data (last transmitted data) to the boebot, means, lets say i disconnect (stop) visual C++, now how would i get the data that was transmitted to the boebot at first place, since i have to RE-tokenize the code and send it for the DEBUG command to become active.
Comments
If you just use the SEROUT 16,n9600,[noparse][[/noparse]inp] command, it will keep sending the data even if you close your C++ program. At that point, you can just open the StampISE debug terminal and connect to the com port.
To go back to the C++ app, you just need to close the Debug Terminal before connecting with your VC++ application.
Also note, that in your VC++ app, you don't need to actually stop the application to make the switch; you just need to close the serial connection. So you could add a Connect / Disconnect button that does this, instead of stopping & restarting the VC++ program.
If I recall sorrectly, there is a VC++ example in this thread:
http://forums.parallax.com/showthread.php?p=607328
Any ways u have to use SEROUT command from the Boebot to send data out of the Basic stamp to the computer and then run the VB application (with that active control) so that u can start reading the values into a text box. Thus u will be having the data into a GUI form which u can use in anyway.
Bye