Convert from hex to float
Posted: 13 Sep 2021 10:02
Hi
I have a sensor where I read four bytes. I have managed to put these values into a dword which is:
0x440B66C9
And now need to transform this hex-value into some readable. Using an online hex->float calculator I see that this hex-value correspond to:
557.606
But how do I get there in the z-uno? I have searched and tried several code suggestions but haven't succeeded. Any suggestions?
I have a sensor where I read four bytes. I have managed to put these values into a dword which is:
0x440B66C9
And now need to transform this hex-value into some readable. Using an online hex->float calculator I see that this hex-value correspond to:
557.606
But how do I get there in the z-uno? I have searched and tried several code suggestions but haven't succeeded. Any suggestions?