<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to convert hexadecimal serial data into real decimal data]]></title><description><![CDATA[<p>First of all, my hardware information is Device:OpenIMU300ZA 5020-3885-02 1.1.2 SN:1908400015,using IMU app.<br />
Now I can print the hexadecimal information as shown in the figure below through the serial port<br />
For example, I know 0x55557331 stands for uus1, 0xD379A13C \ 0x2C AFC73D \ 0xA9F31F41  represent the accelerations of X, y and Z respectively。As shown in the picture。<br />
<img src="https://navview.blob.core.windows.net/forum/upload/656a86b2-6c05-43b1-b45d-9087ff4dc97a-image-ko446f91.png" alt="656a86b2-6c05-43b1-b45d-9087ff4dc97a-image.png" class="img-responsive img-markdown" /></p>
<p>My problem is how to convert hexadecimal serial port data into real decimal data (how to convert hexadecimal serial port information into real sensor decimal information, for example 0XCAF71CC1  stands for -9.810495377)</p>
]]></description><link>https://forum.aceinna.com//topic/265/how-to-convert-hexadecimal-serial-data-into-real-decimal-data</link><generator>RSS for Node</generator><lastBuildDate>Thu, 16 Apr 2026 11:06:55 GMT</lastBuildDate><atom:link href="https://forum.aceinna.com//topic/265.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 30 Apr 2021 09:39:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to convert hexadecimal serial data into real decimal data on Fri, 30 Apr 2021 09:39:23 GMT]]></title><description><![CDATA[<p>First of all, my hardware information is Device:OpenIMU300ZA 5020-3885-02 1.1.2 SN:1908400015,using IMU app.<br />
Now I can print the hexadecimal information as shown in the figure below through the serial port<br />
For example, I know 0x55557331 stands for uus1, 0xD379A13C \ 0x2C AFC73D \ 0xA9F31F41  represent the accelerations of X, y and Z respectively。As shown in the picture。<br />
<img src="https://navview.blob.core.windows.net/forum/upload/656a86b2-6c05-43b1-b45d-9087ff4dc97a-image-ko446f91.png" alt="656a86b2-6c05-43b1-b45d-9087ff4dc97a-image.png" class="img-responsive img-markdown" /></p>
<p>My problem is how to convert hexadecimal serial port data into real decimal data (how to convert hexadecimal serial port information into real sensor decimal information, for example 0XCAF71CC1  stands for -9.810495377)</p>
]]></description><link>https://forum.aceinna.com//post/1121</link><guid isPermaLink="true">https://forum.aceinna.com//post/1121</guid><dc:creator><![CDATA[luken]]></dc:creator><pubDate>Fri, 30 Apr 2021 09:39:23 GMT</pubDate></item><item><title><![CDATA[Reply to How to convert hexadecimal serial data into real decimal data on Wed, 27 Oct 2021 08:49:34 GMT]]></title><description><![CDATA[<p>Hello,<br />
I agree with Luken. It would be nice to know how to convert bytes to float.<br />
There is in python int.from_bytes but no equivalent for floats.<br />
And also, in the example from <a href="https://github.com/erkuo521/openimu_log_tools/blob/master/openimu.py" rel="nofollow">https://github.com/erkuo521/openimu_log_tools/blob/master/openimu.py</a><br />
&quot;fmt = 'Ifffffffff'<br />
data = struct.unpack(fmt, payload)&quot;<br />
give unusable results.<br />
Thanks for your help.</p>
]]></description><link>https://forum.aceinna.com//post/1294</link><guid isPermaLink="true">https://forum.aceinna.com//post/1294</guid><dc:creator><![CDATA[Fredz]]></dc:creator><pubDate>Wed, 27 Oct 2021 08:49:34 GMT</pubDate></item><item><title><![CDATA[Reply to How to convert hexadecimal serial data into real decimal data on Wed, 27 Oct 2021 12:10:17 GMT]]></title><description><![CDATA[<p>Finally, struct unpack work. This is just the documentation witch is not up to date (maybe or I missed something...)<br />
I have an OpenIMU300RI 5020-3309-01 03.01.08 SN:2003100118, Firmware: IMU_J1939 03.01.08<br />
my packet type is 0x7331 's1', and not 0x7a31 'z1' as given</p>
]]></description><link>https://forum.aceinna.com//post/1295</link><guid isPermaLink="true">https://forum.aceinna.com//post/1295</guid><dc:creator><![CDATA[Fredz]]></dc:creator><pubDate>Wed, 27 Oct 2021 12:10:17 GMT</pubDate></item></channel></rss>