<?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>nRF9160-DK asset tracker BME680</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/72579/nrf9160-dk-asset-tracker-bme680</link><description>Hi, can we connect and enable the BME680 in the asset tracker code for the nRF9160DK? 
 It is already on the Thingy and I notice there is a switch CONFIG_BME680 in the code? 
 Is it just a matter of adding the switch? 
 Where do I define the switch? </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 10 Mar 2021 15:33:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/72579/nrf9160-dk-asset-tracker-bme680" /><item><title>RE: nRF9160-DK asset tracker BME680</title><link>https://devzone.nordicsemi.com/thread/299078?ContentTypeID=1</link><pubDate>Wed, 10 Mar 2021 15:33:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d981e21c-1edb-4c09-99a1-02e11c0bf46d</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;The BME680 sensor will automatically be used if you&amp;#39;re using a thingy:91. This is because then you would use the board name &lt;strong&gt;thingy91_nrf9160ns&lt;/strong&gt; and it will automatically include the file &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v1.5.0/applications/asset_tracker/prj_thingy91_nrf9160ns.conf"&gt;&lt;strong&gt;prj_thingy91_nrf9160ns&lt;/strong&gt;.conf&lt;/a&gt;&amp;nbsp;which will enable BME680 through these configurations:&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v1.5.0/applications/asset_tracker/prj_thingy91_nrf9160ns.conf#L72-L76"&gt;https://github.com/nrfconnect/sdk-nrf/blob/v1.5.0/applications/asset_tracker/prj_thingy91_nrf9160ns.conf#L72-L76&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you want to enable it for the nrf9160dk, you should add some similar configurations inside a file prj_nrf9160dk_nrf9160ns.conf&lt;/p&gt;
&lt;p&gt;The BME680 hardware configuration is also set up by default for the thingy:91 in its board folder:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v1.5.0/boards/arm/thingy91_nrf9160/thingy91_nrf9160_common.dts#L114-L118"&gt;https://github.com/nrfconnect/sdk-nrf/blob/v1.5.0/boards/arm/thingy91_nrf9160/thingy91_nrf9160_common.dts#L114-L118&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is because the Thingy:91 actuall comes with a BME680 sensor, and you can also see that it will use i2c instance 2 with sda pin = 11 and scl pin = 12.&lt;/p&gt;
&lt;p&gt;However, for the &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/master/boards/arm/nrf9160dk_nrf9160/nrf9160dk_nrf9160_common.dts#L112-L114"&gt;nrf9160dk board&lt;/a&gt;, the hardware is not configured by default, so you have to configure it yourself through an overlay file. Just name it the same as what you&amp;#39;re bulding with, e.g. if you build using the board nrf9160dk_nrf9160ns, then call it nrf9160dk_nrf9160ns.overlay and configure the hardware there. Take a look at the thingy:91 board folder how to go about it.&lt;/p&gt;
&lt;p&gt;As a first step, you could try to get the sample &lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/a2d2a5e169f7aec8d9de16787af99e59c56c09b7/samples/sensor/bme680"&gt;bme680&lt;/a&gt;&amp;nbsp;up and running. It only has &lt;a href="https://github.com/nrfconnect/sdk-zephyr/tree/a2d2a5e169f7aec8d9de16787af99e59c56c09b7/samples/sensor/bme680/boards"&gt;two board folders&lt;/a&gt;, so you have to add one for the &lt;span&gt;nrf9160dk_nrf9160ns&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>