[squeak-dev] Problem with SerialPort and Cog
Javier Diaz-Reinoso
javier_diaz_r at mac.com
Wed Apr 3 15:53:59 UTC 2013
After line: p openPort: '/dev/cu.usbmodem1a21'., p in Cog is:
SerialPort(closed, 115200 baud, 8 bits, 1 stopbits, no parity)
is closed because port is nil, in Squeak 4.2.5beta1U is:
SerialPort(#'/dev/cu.usbmodem1a21', 115200 baud, 8 bits, 1 stopbits, no parity)
port is: '/dev/cu.usbmodem1a21'.
I repeated my test with a virgin copy of Squeak4.4-12327 (before I was using 4.1 and 4.3), also with other macbook pro, the same error.
On 02/04/2013, at 19:00, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> On Tue, Apr 2, 2013 at 4:27 PM, Javier Diaz-Reinoso
> <javier_diaz_r at mac.com>wrote:
>
>> This example don't work with Cog 4.0.2701 in a iMac OSX 10.8.3:
>>
>> |p s|
>> p := SerialPort new.
>> p baudRate: 115200.
>> p openPort: '/dev/cu.usbmodem1a21'.
>>
>> 1 to: 5 do:[:i|
>> s := p readString.
>> Transcript show: 'i=', i asString, '=>', s, '<=';cr.
>> (Delay forSeconds: 1) wait.
>> i=1 ifTrue:[p nextPutAll: 'M105', String lf.]
>> ].
>> p close.
>>
>> the same code works ok with the Squeak 4.2.5beta1U, this is connected to
>> an Arduino Mega using only a USB cable.
>>
>
> and how does it fail?
>
More information about the Squeak-dev
mailing list
|