<?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>interfacing nrf52840 with gy-521 and gy-89 sensor</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37789/interfacing-nrf52840-with-gy-521-and-gy-89-sensor</link><description>i want to interface the nrf52840 with 2 sensors accelerometer and barometer and read the values what should i do.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 28 Aug 2018 09:39:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37789/interfacing-nrf52840-with-gy-521-and-gy-89-sensor" /><item><title>RE: interfacing nrf52840 with gy-521 and gy-89 sensor</title><link>https://devzone.nordicsemi.com/thread/146072?ContentTypeID=1</link><pubDate>Tue, 28 Aug 2018 09:39:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5630f6a-24a2-4e0c-a6f5-b469720c397e</guid><dc:creator>Haaris</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// Declare a gryro structure variable first

gyro_values_t gyro_values;

// Call this in your main funtion.

err_code = app_mpu_read_gyro(&amp;amp;gyro_values);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Use the above as refernce&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: interfacing nrf52840 with gy-521 and gy-89 sensor</title><link>https://devzone.nordicsemi.com/thread/145814?ContentTypeID=1</link><pubDate>Mon, 27 Aug 2018 07:01:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ceaddf25-7be4-42a0-b5e8-bd978105d1cf</guid><dc:creator>mohanraj360</dc:creator><description>&lt;p&gt;i got accelrometer values and how to get gyroscope values&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: interfacing nrf52840 with gy-521 and gy-89 sensor</title><link>https://devzone.nordicsemi.com/thread/145802?ContentTypeID=1</link><pubDate>Mon, 27 Aug 2018 05:18:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d38b5729-1e45-4aea-8b66-e586620f5385</guid><dc:creator>mohanraj360</dc:creator><description>&lt;ul&gt;
&lt;li&gt;&lt;span&gt;&amp;quot;Use the following definitions in the file nrf_drv_mpu_twi/nrf_drv_mpu_spi&amp;quot; you mentioned like this&amp;nbsp; but where this folder found in that sdk&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: interfacing nrf52840 with gy-521 and gy-89 sensor</title><link>https://devzone.nordicsemi.com/thread/145683?ContentTypeID=1</link><pubDate>Fri, 24 Aug 2018 12:56:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b10e859-947f-4ad3-9150-9fc43a6d1532</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;The breakout board&amp;nbsp;&lt;a href="https://www.digitalimpuls.no/sensorer/135275/gy-521-breakout-board-mpu-6050-3-axis-analog-gyro-plus-3-axis-acceleromete"&gt;gy-521&lt;/a&gt;, includes the &lt;a href="https://www.invensense.com/products/motion-tracking/6-axis/mpu-6050/"&gt;MPU-6050&lt;/a&gt;&amp;nbsp;device (accelerometer and gyro), thus you can use &lt;a href="https://github.com/Martinsbl/nrf5-mpu-examples"&gt;this&lt;/a&gt;&amp;nbsp;link to get it working.&lt;/p&gt;
&lt;p&gt;Follow these steps (assuming you have keil installed):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Connect the MPU-6050&amp;nbsp;to the board in the following manner:&lt;/span&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Pin 27&amp;nbsp;on nrf52840&amp;nbsp;→ SCL on the gy-521 board&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Pin 26 on nrf52840&amp;nbsp;→ SDA on the gy-521 board&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;VDD&amp;nbsp; on nrf52840&amp;nbsp;&amp;nbsp; →&amp;nbsp;VCC on the gy-521 board&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;GND&amp;nbsp; on nrf52840&amp;nbsp;&amp;nbsp; →&amp;nbsp;GND on the gy-521 board&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Enter this&amp;nbsp;&lt;a href="https://github.com/Martinsbl/nrf5-mpu-examples"&gt;this&lt;/a&gt; link&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Follow the steps in the link,&amp;nbsp;under “&lt;/span&gt;&lt;span style="font-weight:400;"&gt;How to use&lt;/span&gt;&lt;span style="font-weight:400;"&gt;”&lt;/span&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;You can start with&amp;nbsp; the mpu-simple example&amp;nbsp;for simplicity&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;In your case, define MPU6050&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Use the following definitions in the file nrf_drv_mpu_twi/nrf_drv_mpu_spi&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define MPU_TWI_SCL_PIN 27
#define MPU_TWI_SDA_PIN 26&lt;/pre&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style="font-weight:400;"&gt;Enable logging in order to see the sensor data&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;I followed these steps using MPU9250, and it worked fine. However, the examples are not tested on MPU6050, but please ask if it doesn&amp;#39;t work. This could be a start, and if you get it&amp;nbsp;to work I can help you with the gy-89.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Best regards Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: interfacing nrf52840 with gy-521 and gy-89 sensor</title><link>https://devzone.nordicsemi.com/thread/145660?ContentTypeID=1</link><pubDate>Fri, 24 Aug 2018 11:09:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85dda347-f4e8-412d-b972-6a7d0800fde1</guid><dc:creator>Haaris</dc:creator><description>&lt;p&gt;Refer the TWI Master example in the sdk for reference(SCK and SDA pins are used in TWI protocol). All the libraries are already there you just have to understand and use it.&lt;/p&gt;
&lt;p&gt;I also found a site which may help you&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/gabriel-ns/nRF5-sensor-libraries"&gt;https://github.com/gabriel-ns/nRF5-sensor-libraries&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now that library is made for nf51 but you&amp;#39;re using an nrf52840 so just use this as a reference, it has BMP180 interfacing example&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: interfacing nrf52840 with gy-521 and gy-89 sensor</title><link>https://devzone.nordicsemi.com/thread/145653?ContentTypeID=1</link><pubDate>Fri, 24 Aug 2018 10:43:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f3bc079-8a4a-41a9-8f94-e928fa140c20</guid><dc:creator>mohanraj360</dc:creator><description>&lt;p&gt;CAN YOU PLEASE HELP ME HOW TO READ SENSOR VALUE THAT HAVE SCK,SDA PINS AND MONITOR IN ANY SERIAL MONITOR.&lt;/p&gt;
&lt;p&gt;YOU CAN TELL FOR ANY SENSOR,THEN I WILL MODIFY FOR MY CODE&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: interfacing nrf52840 with gy-521 and gy-89 sensor</title><link>https://devzone.nordicsemi.com/thread/145651?ContentTypeID=1</link><pubDate>Fri, 24 Aug 2018 10:42:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f306613-003c-4fc6-93f2-4c01e8b170c3</guid><dc:creator>mohanraj360</dc:creator><description>&lt;p&gt;BMP180&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: interfacing nrf52840 with gy-521 and gy-89 sensor</title><link>https://devzone.nordicsemi.com/thread/145640?ContentTypeID=1</link><pubDate>Fri, 24 Aug 2018 09:42:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fcf6b53-d82a-41e1-bbba-411140fef06f</guid><dc:creator>Haaris</dc:creator><description>&lt;p&gt;Let me get this straight, by gy-521 you mean mpu6050 right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>