Convert from hex to float

Discussion about Z-Uno product. Visit http://z-uno.z-wave.me for more details.
Post Reply
tnesheim
Posts: 5
Joined: 10 Sep 2021 14:57

Convert from hex to float

Post by tnesheim »

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?
tnesheim
Posts: 5
Joined: 10 Sep 2021 14:57

Re: Convert from hex to float

Post by tnesheim »

I can probably also do with the two most significant bytes:

0x440B

that corresponds to

556

which have enough accuracy.
Post Reply