Open GoogleCodeExporter opened 8 years ago
Generally it seems that there is something wrong with biteArray writing and
reading
http://code.google.com/p/as3-arduino-connector/issues/detail?id=25
but hopefully for now we can use loop
Read - temporary fix for read readBytesAsByteArray()
var byteArray:ByteArray = new ByteArray();
while(_arduinoConnector.bytesAvailable)
{
byteArray.writeByte(_arduinoConnector.readByte());
}
Write - temporary fix for writeBytes ()
var sent:Boolean = true;
for (var i:uint = 0; i < byteArray.length; i++)
{
var byteSent:Boolean = _arduinoConnector.writeByte(byteArray[i]);
sent = sent && byteSent;
}
trace('sent status: ' + sent);
Original comment by i...@voyda.eu
on 1 Oct 2013 at 10:18
Original issue reported on code.google.com by
i...@voyda.eu
on 1 Oct 2013 at 9:44