Comments on: Flashduino at FITC Toronto 09http://blog.thestem.ca/archives/110
Brett Forsyth's professional work showcase, photos, and ramblings.Tue, 22 Apr 2014 02:25:04 +0000hourly1By: Edhttp://blog.thestem.ca/archives/110#comment-72549
Mon, 21 Dec 2009 17:02:03 +0000http://blog.thestem.ca/?p=110#comment-72549Hello Brett. I came across a comment you made on a post located here http://www.iestyn.net/wp/2008/03/23/getting-flash-and-arduino-talking-and-problems-with-as3 were you said,

“….What you are running into isn’t a big deal to fix yourself…. If you are sending data to flash with the Serial.println() function you can test for the new line character as the end of message at which point you can process it…”

I have a similar situation to the original post where data is being cut off. I need to test for either a new line or a return Can you help me? I do not want to use AS3glue and Firmata and up until now I have not had to.

The data from my Arduino is sent in the following format.

0:123

1:23

2:65

3:7890

t:4560

Occasionally it might have an extra entry like this:

0:123

1:23

2:65

3:7890

t:45654

0f: 45699

The first four entries are a counter for a particular sensor. The t is time in milliseconds. And the 0f (or 1f, 2f, 3f) tells me that an event is finished for a particular sensor. Also the data is coming in a continual stream repeating it over and over with the 5 of 6 lines.

But I can’t seem to figure out how to test for the line break and get the data. I can connect and get the length of the stream no problem. Can you help me with an example? Feel free to email me direct and I can share the code I have so far.