Communicating with other Micros
I posted this in the ooPic group also and we are trying to figure out whats going on. If you have ooPic experience also that would be tremendous! [noparse];)[/noparse]
Ok so my robot is using a ooPic for locomotion, and a Basic Stamp for
doing most other stuff. All the input is going to be going thru the
BS, and then sending out serial data via the SEROUT command, I send
serial data to the ooPic using a oSerialX object to recieve it. I
actually got this working for themost part, but I cant recieve more
than one character at a time for some reason. I assume it has to do
with flow control.
So far with the talk on the ooPic group.. it seems there is definetly a problem with flow control.. I am stumped at this point.
I am sending from the BS2 with this
SEROUT SO\FC, Baud, [noparse][[/noparse]"Hello!", CR]
here is a snippet of the code for the ooPic..
Dim BS2PX As New oSerialX
Dim InFromBS2 As New oBuffer
Dim MyLCD As new oI2C
//code dealing with BS2 communication
InFromBS2 = BS2PX;
MyLCD = InFromBS2;
The result of this is a "H" is printed to the LCD, so its only getting
the first character.
Now if I do this..
InFromBS2 = BS2PX;
MyLCD = InFromBS2;
InFromBS2 = BS2PX;
MyLCD = InFromBS2;
InFromBS2 = BS2PX;
MyLCD = InFromBS2;
InFromBS2 = BS2PX;
MyLCD = InFromBS2;
InFromBS2 = BS2PX;
MyLCD = InFromBS2;
InFromBS2 = BS2PX;
MyLCD = InFromBS2;
it then prints "Hello!" on the LCD.. so I seem to only be able to get
one character at a time.
If I do this
MyLCD = BS2PX;
I get the same result.. one character at a time.
Do I need to write a loop that keeps getting individual characters,
until it recieves a CR then put them as one string?
Ok so my robot is using a ooPic for locomotion, and a Basic Stamp for
doing most other stuff. All the input is going to be going thru the
BS, and then sending out serial data via the SEROUT command, I send
serial data to the ooPic using a oSerialX object to recieve it. I
actually got this working for themost part, but I cant recieve more
than one character at a time for some reason. I assume it has to do
with flow control.
So far with the talk on the ooPic group.. it seems there is definetly a problem with flow control.. I am stumped at this point.
I am sending from the BS2 with this
SEROUT SO\FC, Baud, [noparse][[/noparse]"Hello!", CR]
here is a snippet of the code for the ooPic..
Dim BS2PX As New oSerialX
Dim InFromBS2 As New oBuffer
Dim MyLCD As new oI2C
//code dealing with BS2 communication
InFromBS2 = BS2PX;
MyLCD = InFromBS2;
The result of this is a "H" is printed to the LCD, so its only getting
the first character.
Now if I do this..
InFromBS2 = BS2PX;
MyLCD = InFromBS2;
InFromBS2 = BS2PX;
MyLCD = InFromBS2;
InFromBS2 = BS2PX;
MyLCD = InFromBS2;
InFromBS2 = BS2PX;
MyLCD = InFromBS2;
InFromBS2 = BS2PX;
MyLCD = InFromBS2;
InFromBS2 = BS2PX;
MyLCD = InFromBS2;
it then prints "Hello!" on the LCD.. so I seem to only be able to get
one character at a time.
If I do this
MyLCD = BS2PX;
I get the same result.. one character at a time.
Do I need to write a loop that keeps getting individual characters,
until it recieves a CR then put them as one string?
Comments
And I assume the ".read" is the default "=" operation of the InFromBS2 object?
I'd quit using so many 'default' methods. Surely there's a "readbuffer" method of some kind?
Dim InFromBS2 As New oBuffer(20)
default for "=" is read.. and without specifying what to read, it reads ".Value"
I have tried also using this
InFromBS2.String = BS2PX.String;
which still gives me just one character at a time