<?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>how to use acc-gyro 6050 with nrf51822 and soft device?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/4868/how-to-use-acc-gyro-6050-with-nrf51822-and-soft-device</link><description>Hi.
I read in the sdk documentation, there is a library to use MPU-6050.
So i try to find it but I did not succeed.
i want to read data from 6050 and send this data with advartising method.
someone can help me communicate with the sensor? I think</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 29 Dec 2014 17:26:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/4868/how-to-use-acc-gyro-6050-with-nrf51822-and-soft-device" /><item><title>RE: how to use acc-gyro 6050 with nrf51822 and soft device?</title><link>https://devzone.nordicsemi.com/thread/17199?ContentTypeID=1</link><pubDate>Mon, 29 Dec 2014 17:26:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0759e9e9-9e03-4626-850b-919de7e6c365</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;Which SDK version are you using? In the newest SDK (7.1.0) the drivers are located in the &lt;code&gt;(SDK path)\components\drivers_ext\mpu6050&lt;/code&gt; folder. You must include &lt;code&gt;mpu6050.h&lt;/code&gt; as well as the &lt;code&gt;components\drivers_nrf\twi_master\twi_master.h&lt;/code&gt; library in your &lt;code&gt;main.c&lt;/code&gt; file. The two corresponding c-files &lt;code&gt;mpu6050.c&lt;/code&gt; and &lt;code&gt;twi_sw_master.c&lt;/code&gt; must be added to you Keil project.&lt;/p&gt;
&lt;p&gt;If you are using packs for Keil, the mpu6050 drivers and TWI library are found under nRF_Drivers_External and nRF_Drivers respectively (In the &amp;quot;Manage Run-time Environment&amp;quot; window)&lt;/p&gt;
&lt;p&gt;The mpu6050 drivers provide you with the functions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;mpu6050_init()&lt;/li&gt;
&lt;li&gt;mpu6050_register_write()&lt;/li&gt;
&lt;li&gt;mpu6050_register_read()&lt;/li&gt;
&lt;li&gt;mpu6050_verify_product_id()&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In &lt;code&gt;main()&lt;/code&gt;, first initialize TWI, then the mpu6050:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;twi_master_init();
mpu6050_init(addr);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you use the software TWI (&lt;code&gt;twi_sw_master.c&lt;/code&gt;, not &lt;code&gt;twi_hw_master.c&lt;/code&gt;) it should work with the softdevice enabled.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>