In theory in C++ what you try to do is undefined - if you use the double representation to store something in the union, in theory you can only use the double to read it. (but does work with most compiler, but good to know this is undefined according to the C++ standard)
Otherwise there is nothing wrong with your numbers.
thanks
the payload start with [1] because is a xbee packet and I've used the payload[0] to other data.
these 4 payloads are the temperature read for my sensor.
I understuood your explanation, and I'm happy because i could send the righ number double from arduino/xbee to my labview vi, but my problem is : how can i put togheter again this number in labview
I have a questiom: what is the msb and the lsb in my example ( I'm a little confuse about that..and maybe for that I can't get the right number in labview)..I'm using this way
payload 1- msb
paylodad 2 lsb
and join with join numbers in Labview - join1
payload 3 msb
and payload 4 lsb - join 2
and use join number 1 and 2 to put togheter the original decimal number ( i think this is worng way....hahahaha)
so 3,14159 is represented by 0x40490FD0 in memory. on your arduino 40 is the MSB (most significant byte) and DO is the LSB (least significant byte).
I'm confused why you want to send that as a double... why don't you send an integer... How precise is your temperature sensor?? does it even give a one digit precision?? if so multiply the temperature by 10, send it as an integer and divide it by ten on the other side to get back the 1 digit precision.
I'm not familiar with Labview, how do you receive the stream of data? once you know that you can build back the number.
thanks for everybody..
JMl your idea about x100 was great i used that...and works.
but , I really like to know how i receive this string in labview.
I know labview works with strings...the problem is....I don't know how do that ( I'm learning...but slowly...rsrsrs)
I know this is an arduino forum, but ......somebody understand Labview???rsrsrsrs
because in Labview forum the people is so experts...and humble questions like that don't deserve a answer...rsrsrsrs