您的位置:首页 > 产品设计 > UI/UE

[updated]Notes on Arduino&Xbee -> Flash(ActionScript3)

2012-02-21 11:17 435 查看
Xbee issue

The length of the package doesn't count the escape character, which means use the original package size

Also when calculate checksum, use the original data as well

if checksum is wrong, won't be able to receive the package

when encountered certain data that has conflict with reserved byte, need to do some bitwise operation(plus something, and something)

AS3 ProgressEvent Class
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/ProgressEvent.html
In Erik's AS3 we use

addEventListener(ProgressEvent.SOCKET_DATA, socketDataHandler, false, 0, true);

(

current class is inherited from the socket class AS3 provided
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/Socket.html
)

quick note 7 March

FrameID

error handler

sending rate

Turned out sysEx doesn't apply for our architecture...

This guys trying to use sysEx and firmata/c#

Some good points
http://arduino.cc/forum/index.php?topic=45435.0;wap2
Firmata.attach(START_SYSEX, processIRCallback);

public void sendIRWrite(int pin_number, string IRPulseStream, int Mhz)
{
byte[] message = new byte[5];
message[0] = Arduino.START_SYSEX;
message[1] = pin_number;
message[2] = IRPulseStream;
message[3] = Mhz;
message[3] = Arduino.END_SYSEX;
_serialPort.Write( message, 0, 3);
}
// however this is not working well
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: