[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
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
相关文章推荐
- Notes on <Understanding AJAX: Using JavaScript to Create Rich Internet Applications>
- Notes On <Pro JavaScript with MooTools> - 02
- Notes On <The Definitive Guide to HTML5> - 02
- Notes On <Pro jQuery Mobile>
- Notes On <Practical ASP.NET Web API> - 01
- Reading notes on <The Art of Unix Programming>(1)
- Notes On <Pro JavaScript with MooTools> - 01
- Notes on <jQuery in Action> - 1
- Notes on <jQuery in Action> - 2
- Notes On <Agile Web Application Development with Yii 1.1 and PHP5> - 01
- Notes on <jQuery in Action> - 3
- Notes On <The Definitive Guide to HTML5> - 01
- Notes On <The Definitive Guide to HTML5> - 03
- Notes on <Papervision 3D Essentials> - 02
- Notes On <Codeigniter for Rapid PHP Application Development> - 01
- Notes on <jQuery in Action> - 5
- Notes on <Papervision 3D Essentials> - 01
- Notes On <AJAX & PHP> - 2
- Notes On <PhoneGap, Mobile Web Framework for JavaScript and HTML5>
- Notes On <Enterprise AJAX – Strategies for Building High Performance Web Applications> - 1