In the Pd svn I have an external [b2f] which probably does what you want. Not sure if it made in into Pd-extended yet as there don't seem to be many recent builds available, but it should be straightforward to compile.
http://sourceforge.net/p/pure-data/svn/HEAD/tree/trunk/externals/mrpeach/ser...
Martin
On Sun, Oct 19, 2014 at 10:48 PM, Peter P. via Pd-list <pd-list@lists.iem.at
wrote:
Dear Pd-list,
I am trying to get a Razor AHRS sensor to work with Pd using its comport external. This sensor sends three angles (yaw, pitch, roll). Each of these angles is said to be sent as a 4 byte (single precision) float value.
This float value arrives in Pd from comport's outlet as three values 0-255. The byte order is little-endian.
I understand that a 4byte single precision float has a 1bit sign, an 8bit exponent and a 23bit mantissa.
After five hours of trying I am wondering how I could convert this number into a Pd float.
I would be delighted to receive any pointers as I have run out of ideas by now.
thank you so much! P
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list