how to detect if debug terminal available
verobel
Posts: 81
Fellow Stampers;
Sometimes you might want to run your program while attached to a pc where Debug window is available. Other times the Debug window may not be available (you are running the circuit on its own). How can you detect when no Debug window is available?
Thanks, John
Sometimes you might want to run your program while attached to a pc where Debug window is available. Other times the Debug window may not be available (you are running the circuit on its own). How can you detect when no Debug window is available?
Thanks, John
Comments
·· There is currently no way to detect if the BASIC Stamp is connected to the computer and if a DEBUG window is open.· You could (in an OEM circuit) detect the connection to the computer using a clever circuit on the DB9, but that wouldn't tell you if the DEBUG window was·even open on the PC.· I hope this helps.· Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
If nobody enters anything, the time-out occurs and the program runs -- the programmer assuming that there's no debug terminal attached.
·· That is of course if the program even accepts input.· I mean, if you had a program on the PC designed to communicate with the Stamp Module you could also do something.· But if the conversation is one-way there won't be a way.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I like the idea of a time-out interval at the start of the program.. during which the user must input say 'Y' to activate a debugFlag=1. If he does nothing debugFlag=0.
In my case I wanted to either accept input from Debug or from a pushbutton (if Debug was not there)
So, how do you implement a time-out interval.. I thought DEBUG or SERIN just blocked the program until an input was received. Do you have a few lines of sample code?
Thanks, John
From the PBasic IDE help file:
Timeout is an optional variable/constant/expression* (0 - 65535) that tells SERIN how long to wait for incoming data. If data does not arrive in time, the program will jump to the address specified by Tlabel.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
OS-X: because making Unix user-friendly was easier than debugging Windows
links:
My band's website
Our album on the iTunes Music Store