[squeak-dev] Question about serial port communication

Jon Hylands jon at huv.com
Sat Jun 20 14:45:16 UTC 2009


On Sat, 20 Jun 2009 16:37:53 +0200, Víctor C. T. <victorct83 at gmail.com>
wrote:

> sendHello: SerialPort2
> | ba |
> ba := ByteArray new: 2.
> ba at: 1 put: 16r30.
> ba at: 1 put: 16r20.
> SerialPort2 nextPutAll: ba.

You're putting both bytes at location 1 in the ByteArray, at least in this
code, so you're sending (0x20 0x00), instead of (0x30 0x20)...

Later,
Jon

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

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



More information about the Squeak-dev mailing list