<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.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/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>NRF 51822 &amp;amp; MPU 9250 Source code</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/19494/nrf-51822-mpu-9250-source-code</link><description>Hi Sir, 
 I have a NRF 51822 board &amp;amp; MPU 9250 sensor.
I want to read YAW,PITCH,ROLL,ACC_X,ACC_Y,ACC_Z,GX,GY,GZ,MX,MY,MZ values from MPU Sensor. 
 Could you please share a working code which i can able to read all above values. 
 Thanks in advance</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Feb 2017 13:41:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/19494/nrf-51822-mpu-9250-source-code" /><item><title>RE: NRF 51822 &amp; MPU 9250 Source code</title><link>https://devzone.nordicsemi.com/thread/75731?ContentTypeID=1</link><pubDate>Tue, 07 Feb 2017 13:41:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6b5c3b0-0f37-4b74-94ed-9ac7bc66468a</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;I&amp;#39;m not qualified to give an opinion on that. Your guess is as good as mine.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF 51822 &amp; MPU 9250 Source code</title><link>https://devzone.nordicsemi.com/thread/75732?ContentTypeID=1</link><pubDate>Tue, 07 Feb 2017 11:39:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05440f15-5aba-4dc5-a3f6-924199f25b3a</guid><dc:creator>Rakesh</dc:creator><description>&lt;p&gt;Hello,
Is this a right way??&lt;/p&gt;
&lt;p&gt;ypr[0] = atan2(2 * q[1] * q[2] - 2 * q[0] * q[3], 2 * q[0]&lt;em&gt;q[0] + 2 * q[1] * q[1] - 1);
ypr[1] = atan(gx / sqrt(gy&lt;/em&gt;gy + gz&lt;em&gt;gz));
ypr[2] = atan(gy / sqrt(gx&lt;/em&gt;gx + gz*gz));&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF 51822 &amp; MPU 9250 Source code</title><link>https://devzone.nordicsemi.com/thread/75730?ContentTypeID=1</link><pubDate>Tue, 07 Feb 2017 11:23:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd088944-1973-4aa9-88f7-7f8c1ed83f74</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;I think you need to google that. I believe there are plenty of methods and algorithms you can use to achieve this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF 51822 &amp; MPU 9250 Source code</title><link>https://devzone.nordicsemi.com/thread/75729?ContentTypeID=1</link><pubDate>Tue, 07 Feb 2017 10:33:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6af1ab0-3111-4cb9-982c-e237e9838521</guid><dc:creator>Rakesh</dc:creator><description>&lt;p&gt;Hi Sir,&lt;/p&gt;
&lt;p&gt;We could able to read all these below values.&lt;/p&gt;
&lt;p&gt;ACC_X,ACC_Y,ACC_Z,GX,GY,GZ,MX,MY,MZ,&lt;/p&gt;
&lt;p&gt;Could you help me how to calculate YAW,PITCH,ROLL values, so that it would be really helpfull for us.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF 51822 &amp; MPU 9250 Source code</title><link>https://devzone.nordicsemi.com/thread/75727?ContentTypeID=1</link><pubDate>Mon, 06 Feb 2017 13:05:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:221274af-e71c-4c21-92ef-b5c81aa5530e</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Are you talking about the values printed to the terminal or the values sent over BLE? If it is the values printed to the terminal then you should look at the &lt;a href="http://www.cplusplus.com/reference/cstdio/printf/"&gt;printf documentation and its formatting specifiers&lt;/a&gt;. If you want to transfer the data over BLE as a human readable string with decimal values you should look into the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v13.0.0/ble_sdk_app_nus_eval.html?cp=4_0_0_4_2_2_16"&gt;UART/Serial Port Emulation over BLE&lt;/a&gt; and merge that with the mpu example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF 51822 &amp; MPU 9250 Source code</title><link>https://devzone.nordicsemi.com/thread/75728?ContentTypeID=1</link><pubDate>Mon, 06 Feb 2017 12:30:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99e1950a-706e-48b9-a480-dfadee734a18</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;thank you sir,
But from this code we are getting values in HEX format. how to convert them to decimal.one more thing I think we are getting only accelerometer sensor values.how to get the remaining sensor values&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF 51822 &amp; MPU 9250 Source code</title><link>https://devzone.nordicsemi.com/thread/75726?ContentTypeID=1</link><pubDate>Mon, 06 Feb 2017 11:59:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b43f54b0-f64d-40ba-9538-a0d5638ba653</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi. We don&amp;#39;t have any official ecamples, but you might be interested in &lt;a href="https://github.com/Martinsbl/nrf5-mpu-examples"&gt;this git repo&lt;/a&gt;. The examples show how to get ACC_X,ACC_Y,ACC_Z,GX,GY,GZ,MX,MY,MZ, but you will have to calculate yaw, pitch and roll yourself.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>