I am working on a project where I need to split a floating variable into 4 bytes so I can transfer them over a rs485 setup.
I have been able to do this with int variables by using highByte and loByte; then I am able to reconstructing them using Value = word(loValue, hiValue);
Is there a function that can do this for a floating type that can split it into 4 variables?
Btw, there is no guarantee that the receiving equipment uses the same representation for floats. Even if they both use IEEE954, there could be endian issues.
Except we don't know what is on the other end of the RS485, which - by implication - is some older bit of machinery that requires who knows what to function.