BS2sx and VB
lindb
Posts: 10
hello,
How can i use my Basic stamp II sx·to communicate with Visual Basic 6?
sweden
Post Edited By Moderator (Jon Williams (Parallax)) : 6/30/2005 1:01:14 PM GMT
How can i use my Basic stamp II sx·to communicate with Visual Basic 6?
sweden
Post Edited By Moderator (Jon Williams (Parallax)) : 6/30/2005 1:01:14 PM GMT
Comments
http://www.parallax.com/dl/docs/cols/nv/vol3/col/nv89.pdf
Note: Remember to add a subject line to your posts -- you'll get more responses and get them quicker (I fixed this one).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
(You'll have to change the 'baudmode' parameter for the
·faster BS2sx).
What i am trying to do is to use two (or more) ir-detectors sending their signals to Visual basic separatly(did i spell that right[noparse]:)[/noparse]
For example: when the·first ir-detector generate a·signal it will·appear a red box in VB, when the second·ir-detector generate a signal it will appear a·green box.
Hello from sweden
lindbäck
Then write a BS2 program which will 'sample' two (or more) ir-detectors, translate what it sees into some message, and send that message to the VB program using SEROUT over the serial port.
You'll need to define some kind of protocol so the VB program knows which IR detector is being communicated. Something like:
"! IR1 ON "
"! IR2 OFF "
Meaning IR1 got an ON reading (whatever that means), and IR2 got an 'OFF' reading.
Then in the VB program you can easily update the background color property of a text-box, for instance, to make it red or green.