I'm struggling to get a section of code working on my Arduino Uno.
I have a double variable (eg. var = 3.14) and would like to isolate the individual bytes.
I'm aware the Arduino uses 4 bytes to store this value and I would like to take the individual hex data and store in 4 separate variables as described below.
Example: double var = x.xx (00000000 11111111 22222222 33333333) byte new0 = 0xFF (00000000) byte new1 = 0xFF (11111111) byte new2 = 0xFF (22222222) byte new3 = 0xFF (33333333)
The bytes are eventually going to end up in LabVIEW (Via XBEE Packets) in which I will reconstruct the bytes as a double.
Any help with this will be much appreciated.