BASIC Stamp project questions
davidchlupacek
Posts: 2
I have a question for a project i am working on, right now i have setup my microcontroller and have a switch on it, what i would like to do is when the switch is activated i would like the microcontroller to send a command to the computer and then at that point the computer would run a batch file. How would i go about doing this?
Comments
What programming languages are you familiar with on your computer?
--Rich
http://www.parallax.com/Store/Microcontrollers/BASICStampDevelopmentBoards/tabid/137/CategoryID/12/List/0/SortField/0/Level/a/ProductID/118/Default.aspx
End of life and on sale, ACT NOW! Operators are standing by!
If you're using a BS2, you can use pretty much any program that will read from a serial port since the BS2's DEBUG statement produces standard serial data at 9600 Baud. For a single on/off switch, you could simply have the Stamp output a "0" when the switch is off and "1" when the switch is on, over and over again. The PC will just see a continuous stream of "0"s and "1"s and you can do anything you want with that.
I need to solve the problem in the opposite direction:
I have a PC running Win 7 and some VisualBasic code. In certain condition, the PC will send a signal to a BS2 running on an Board of Education. The BS2 code has a loop looking for the signal (a word, or even a "1"); when the signal is reach, the BS2 will trigger some routine.
The problem for me is: how to comunicate the PC with BS2? via the provided Serial Port on the board? Any other way?
Any help (or examples) will be very useful
Thanks and regards
merlin
http://forums.parallax.com/showthread.php?132263-VB-2005-and-BS2-why-won-t-the-signal-stop-after-I-close-connection&p=1009669&viewfull=1#post1009669