In-code COM port selection and change
Hi all,
I am trying to figure out a way to change the selected COM port I am using for communicating with my Boe Bots within the code itself and not through the window selection in the BasicStamp app. I am pretty confused on where to start... The basic idea is that I want to control a number of devices simultaneously, without interacting with BasicStamp after loading the code on.
Thanks for your help!
Lena
I am trying to figure out a way to change the selected COM port I am using for communicating with my Boe Bots within the code itself and not through the window selection in the BasicStamp app. I am pretty confused on where to start... The basic idea is that I want to control a number of devices simultaneously, without interacting with BasicStamp after loading the code on.
Thanks for your help!
Lena
Comments
Note that you can open several com ports at once to different terminals. I think the BS editor allows for 5. You could also use some other terminal program such as Parallax Serial Terminal.
Lena
I once wrote a simulation program that used multiple COM ports, and was able to open multiple ports. The actual port the BS2 is connected to can't be changed on-the-fly, but you can certainly open multiple ports to multiple BS2's.
On the Stamp side, nearly identical code on each Stamp would let it send an ID back to the PC, e.g.:
On the PC side, in pseudo code (but not showing logic for checking for timeout on serialRead):
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php