[squeak-dev] Problem with SerialPort and Cog
Javier Diaz-Reinoso
javier_diaz_r at mac.com
Tue Apr 2 23:27:50 UTC 2013
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.
More information about the Squeak-dev
mailing list
|