Receiving a string Serially
The fullduplexserial object provides a means to transmit a string. How do you receive the string on the other end?
How do you read in the "Some Text" on the other end?
Post Edited (kt88seamp) : 6/28/2010 12:09:53 AM GMT
FDSER.str(string("Some Text"))
How do you read in the "Some Text" on the other end?
Post Edited (kt88seamp) : 6/28/2010 12:09:53 AM GMT

Comments
They both show how to read from a serial input.
Bill
pub rxstr(pntr) | c bytefill(pntr, 0, 32) repeat c := serial.rx if (c == 13) or (c == 0) quit else byte[noparse][[/noparse]pntr++] := cThis assumes you have a 32-character buffer (array of bytes) at the address indicated by pntr, and an object called serial that has an rx method (like FullDuplexSerial).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon McPhalen
Hollywood, CA