logo       

Re: serial port access: msg#00085

lang.smalltalk.squeak.beginners

Subject: Re: serial port access

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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise