Having lost interest in processing and having a bit of experience with Flash, I decided to research methods of integrating my dual nunchuk configuration with Flash via the USB/Serial communication. After much heart ache, I finally found a site created by Kasper Kamperman that had details on how to connect the two. His site contains a download for the FLA and AS files, which are a main component for this project. It is important to note that this code is designed for Flash 10/Actionscript 3.
The second component is Serproxy, the download of which is located at the bottom of the Arduino software page. Serproxy converts the serial connection to the Arduino into a network connection so that flash can access the data. Further info on Serproxy can be found at the Arduino Playground Serial-to-Proxy page .
Serproxy requires a modification to its CFG file via any text editor in order to direct Serproxy to the correct port. The instructions on how to do so can be seen within the CFG file near the bottom of the code (use something other than notepad). Also, ensure comm_baud matches your baud setting for your serial communications.
Kamperman's code takes data, separated by commas and ended by "\r", and places it in an array called "receivedValues", where the received data is separated and stored in the array in a chronological fashion. This data refreshes every time the Arduino completes transmission. To use this with my previous code, one must change the "\n" to "\r" in my main Arduino code. Or you could download the new one.
No comments:
Post a Comment