<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Problem getting data from ST-WINBX1 sensors</title><link>/technologies/embedded/b/blog/posts/problem-getting-data-from-st-winbx1-sensors</link><description>Hello Element14 Community members,

I have been working on element14 roadtest for ST-WINBX1 and wanted to know about the problem that I am facing to get the sensor data.

I am using Zephyr OS. I am getting the data for one accelerometer but after tha</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Problem getting data from ST-WINBX1 sensors</title><link>https://community.element14.com/technologies/embedded/b/blog/posts/problem-getting-data-from-st-winbx1-sensors</link><pubDate>Tue, 26 Aug 2025 10:23:54 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:c1a9c0f2-c4f1-495e-908d-eb3c67c7ea4f</guid><dc:creator>BigG</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Your code snippet is a little confusing. On one hand you have&amp;nbsp;&lt;strong&gt;sensor_sample_fetch(acc)&lt;/strong&gt; and then further down you have&lt;strong&gt;&amp;nbsp;sensor_sample_fetch(acchp)&lt;/strong&gt;. Which is not workiing? Am I to assume that &lt;strong&gt;acc&lt;/strong&gt; is the first sensor and &lt;strong&gt;acchp&lt;/strong&gt; is the second.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If that&amp;#39;s the case then the problem lies with the returned data struct.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;sensor_channel_get(acchp, SENSOR_CHAN_ACCEL_XYZ, &amp;amp;&lt;strong&gt;hpaccx&lt;/strong&gt;);&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I suspect that hpaccx is too small to contain all 3 axes. Make this data struct large enough to get all 3 axes as that is what SENSOR_CHAN_ACCEL_XYZ is telling it to do.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=29162&amp;AppID=7&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>