![Photo](http://www.gravatar.com/avatar/d1664c5edced0e004ced688fe355d64b?s=100&d=http%3A%2F%2Fforums.netduino.com%2Fpublic%2Fstyle_images%2Fmaster%2Fprofile%2Fdefault_large.png)
Serial Handler
#1
Posted 17 November 2014 - 01:27 PM
#2
Posted 19 November 2014 - 02:13 AM
hello there,
first off let's look at your datreceived event handler;
static void serial_DataReceived(object sender, SerialDataReceivedEventArgs e)
you can put a whole packet into queue.
anyhow, something for you to get started on, ask questions, have fun.
cheers
ron
#3
Posted 23 November 2014 - 10:35 PM
Thanks Ron,
Funny, I also got a suggestion from a programmer at work that moving the data as strings would be easier. I guess that's probably the more common way to do it; something I'm going to try.
That sleep was basically only allowing the buffer to get filled once! Thanks for the advice.
The way i have been handling the data so far is parsing it out once it's in the Netduino. I have a routine that looks through the bytes[] array and basically just walks through it and uses it the comma and the carriage return delimiters to determine whether the value is a power level (first column) or delay time (second column).
I'll let you know how it goes-probably won't get back to this until after Wednesday of next week. But I'll definitely keep you posted.
Thanks again,
Miguel
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users