[Newbies] serial port access

Matthew Fulmer tapplek at gmail.com
Sat Oct 14 23:59:02 UTC 2006


On Sat, Oct 14, 2006 at 08:26:03PM -0300, Juliano Mercantil wrote:
>    I'm a newbie in Squeak, and i'm in a desperate need to use a serial port
>    to comunicate with an external device.
>    I've found the System-Serial Port, but i really need to see a working code
>    example.
>    Can anyone help? I just need to send some bytes and read the answer.

SerialPort looks like a very simple and straightforward class.
Just from reading the code, I would suspect that the usage is:

p := SerialPort new initialize.
p openPort: 0.
p nextPutAll: aStringOrByteArray.
p readByteArray.
p close.

Note that I have never used it. I just read the instance methods
and their comments.

-- 
Matthew Fulmer


More information about the Beginners mailing list