Ultrasonic anemometer reading

robtillaart:

$IIMWV,225.0,R,000.0,N,A *38$IIMWV,225.0A

your output looks this way probably because the receiving char array is 40 bytes long and the lines too

There is a bug in your code (you did't copy very well :wink:

your copy

my original

do you notice the fundamental difference?

-I tried to put the data [28] but this didn't made any difference for some reason, that's why I put it back to 40.

-The bad copy is because your way wasn't very clear for me, and I found this one on the arduino forum. And this I did understand more. But I guess I don't get the fundamental difference than.. It would be nice if you maybe can explain it a little for me :blush:

@ PaulS:
-It's possible that it isn't called because I actually didn't knew it was possible to make a void that way.

  • For the NULL terminated part, I don't know if I'm getting it right? So the '\0' tells that this is the end of the string, right? And with my 0 I'm just doing something foolish?
    The data isn't a string at that moment? Because I thought, what I was doing is getting every character and putting if behind each other and therefor make a string? (correct me if I'm wrong)
  • I changed dataStream to SerialInput. This maybe fits better.
    -I used the strtok_r() because when I searched how the strtok() function worked, I always ended up with the strtok_r() function. What I got from it was that you can't overwrite the data in a memory with the strtok_r(), and with the normal strtok() you could. So I think this wasn't a good idea after all. The multi-threaded thing, I don't understand it yet. I'll search about it so that I can follow you.

I'm very sorry for these noobisch questions, but I can't help it that I need to do this for my bachlor thesis. I just hope I learn something about it because it looks very interesting atm. Even with this little knowledge that I got.

If there are other, better options to get the information from the received string, you can always tell, I don't know if this is the best way.