Certainly the class SerialPort2 that I use doesn't have any method with these initialization parameters, I didn't realize it... (this is a bit embarrassing...) :P

Well, I'll prove your code tomorrow at work. Thanks a lot for your help Jon!!!

2009/6/20 Jon Hylands <jon@huv.com>
On Sat, 20 Jun 2009 21:39:37 +0200, Víctor C. T. <victorct83@gmail.com>
wrote:

> Is it correct? I don't get any error at this point...

I don't see any code to specify the # of data bits, # of stop bits, or the
parity. Do they default to the "normal" values (8N1)?

Also, you need to make sure the port itself is set up without any hardware
flow control - I've never used an Arduino, but I assume its providing a USB
interface that ends up using an FT232 or something like that.

That serial port class is different than the one I use for my robotics
stuff. I've attached the serial port class I use, and it is set up like
this:

       | serialPort baudRate comPortNumber |
       baudRate := 115200.
       comPortNumber := 2.
       serialPort := SerialPort new
               baudRate: baudRate;
               dataBits: 8;
               stopBitsType: 1;
               parityType: 0;
               yourself.

       (serialPort openPort: comPortNumber) isNil
               ifTrue: [ ^self error: 'COM port not available' ].

       ...
       serialPort close.

Later,
Jon

--------------------------------------------------------------
  Jon Hylands      Jon@huv.com      http://www.huv.com/jon

 Project: Micro Raptor (Small Biped Velociraptor Robot)
          http://www.huv.com/blog






--
Víctor