Notice: Array to string conversion in /var/www/wiki.sourcebinder.org/includes/Setup.php on line 304

Warning: Parameter 1 to Language::getMagic() expected to be a reference, value given in /var/www/wiki.sourcebinder.org/includes/StubObject.php on line 58
Arduino1 - SourceBinder Wiki

Arduino1

From SourceBinder Wiki

Jump to: navigation, search

Arduino and SourceBinder

You need the following things to be able to use an Arduino board with SourceBinder

  1. a connected arduino with uploaded firmata serial proxy
  2. a crossdomain.xml policy file
  3. a small script to serve this policy file on your computer localhost

SourceBinder uses the latest version (r59) of the as3glue library to communicate with arduino. Please check the as3glue google code page to get detailed instructions. http://code.google.com/p/as3glue/


Small guide to set up a valid policy file

For a brief tutorial to set up a socket policy file see: http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html

for more information on this topic check: http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html

The Arduino node uses socket connection to communicate via the serialproxy. In order to let online flash applications communicate with your localhost there must be a policy file available to enable socket connections. Flash looks for the policy file at 843 port number of the the host which in our case is localhost. This problem can easily be solved with a small script made available by adobe step by step

  • download and unzip the script from adobe
  • make sure the content of the flashpolicy.xml that comes with the zip above does have the correct settings

<?xml version="1.0"?>

<!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy> 
<site-control permitted-cross-domain-policies="master-only"/>
<allow-access-from domain="sourcebinder.org" to-ports="1000-20000" />
</cross-domain-policy>


  • Run the policy file proxy like described in the Adobe tutorial. For mac users it's quite simple: run the standalone script from the flashpolicyd_v0 6 standalone folder

sudo flashpolicyd py --file flashpolicy.xml --port 843

  • run serialproxy
Personal tools