<?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>Building ccs811 sensor Sample code on a nrf9160dk</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97890/building-ccs811-sensor-sample-code-on-a-nrf9160dk</link><description>I am trying to build the ccs811 sample code provided by zephyr. This is very new to me and I&amp;#39;m struggling to get it to work. I am currently using SDK version 2.3.0, toolchain 2.3.0, but building using nrF Connect in VS Code. When i make the build configuration</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Apr 2023 08:02:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97890/building-ccs811-sensor-sample-code-on-a-nrf9160dk" /><item><title>RE: Building ccs811 sensor Sample code on a nrf9160dk</title><link>https://devzone.nordicsemi.com/thread/418967?ContentTypeID=1</link><pubDate>Tue, 04 Apr 2023 08:02:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7eaead1a-e860-4339-9189-8c6f52242091</guid><dc:creator>&amp;#216;yvind</dc:creator><description>[quote user="kew_flex"] I&amp;#39;ve put the reset, int, and wake pins on 23, 24, and 25 as they didn&amp;#39;t conflict with anything.[/quote]
&lt;p&gt;Looking at the&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf91_dk/UG/nrf91_DK/if_connector.html"&gt;GPIO interfaces of the nRF9160DK&lt;/a&gt;&amp;nbsp;it does look like these are used/conflicting, You could test with&amp;nbsp;&lt;span&gt;P0.00, P0.01, P0.14, and P0.15, or use pins that are not listed in GPIO interfacce&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1680592675030v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Building ccs811 sensor Sample code on a nrf9160dk</title><link>https://devzone.nordicsemi.com/thread/418721?ContentTypeID=1</link><pubDate>Sun, 02 Apr 2023 21:55:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfde071d-488d-4c63-b1f6-59f71e78e596</guid><dc:creator>kew_flex</dc:creator><description>&lt;p&gt;Hi again, finally got back around to working on this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I did the DevAcademy course and gained a lot of understanding of the device tree and overlay files etc.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I created this overlay file for the nrf9160dk_nrf9160_ns:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;arduino_i2c: &amp;amp;i2c2 {
	compatible = &amp;quot;nordic,nrf-twim&amp;quot;;
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;i2c2_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;i2c2_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;

    /* Sparkfun Environment Combo uses second I2C address */
	ccs811: ccs811@5b {
		compatible = &amp;quot;ams,ccs811&amp;quot;;
		reg = &amp;lt;0x5b&amp;gt;;
		irq-gpios = &amp;lt;&amp;amp;gpio0 23 GPIO_ACTIVE_LOW&amp;gt;;
		wake-gpios = &amp;lt;&amp;amp;gpio0 24 GPIO_ACTIVE_LOW&amp;gt;;
		reset-gpios = &amp;lt;&amp;amp;gpio0 25 GPIO_ACTIVE_LOW&amp;gt;;
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;to add the ccs811 sensor to the board config. I&amp;#39;ve put the reset, int, and wake pins on 23, 24, and 25 as they didn&amp;#39;t conflict with anything. The application builds successfully. However, when I flash to the 9160 dk DEVICE_DT_GET_ONE(ams_ccs811) returns a NULL pointer. As a result, device_is_ready(dev) says device is not ready and the application doesn&amp;#39;t advance. From reading it seems this is because the device isn&amp;#39;t initialized. How can I get it to do this?&lt;/p&gt;
&lt;p&gt;Thanks&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Building ccs811 sensor Sample code on a nrf9160dk</title><link>https://devzone.nordicsemi.com/thread/416450?ContentTypeID=1</link><pubDate>Tue, 21 Mar 2023 08:46:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc003653-3465-4320-ba5d-dc0ce9814ad1</guid><dc:creator>&amp;#216;yvind</dc:creator><description>[quote user="kew_flex"]I would have to use I2C to communicate with the board so should I instead be looking at the I2C examples instead of the ccs811 example? Or by adding the ccs811 to the board definition will it work?[/quote]
&lt;p&gt;In order to use the sensor, you will need to &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.3.0/zephyr/build/dts/intro.html#introduction-to-devicetree"&gt;add this to the Devicetree&lt;/a&gt;&amp;nbsp;of nRF9160 DK, part of the board definition. You should be able to add the sensor to the DK by adding an overlay file in you project e.g. nrf9160dk_nrf9160_ns.overlay, and then add something similar to this configuration:&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/4834.nrf9160dk_5F00_nrf9160_5F00_ns.overlay"&gt;devzone.nordicsemi.com/.../4834.nrf9160dk_5F00_nrf9160_5F00_ns.overlay&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is just a quick test to verify successful build as I do not have&amp;nbsp;access to any type of I&lt;sup&gt;2&lt;/sup&gt;C sensor i.e. CCS811&lt;/p&gt;
&lt;p&gt;Note that the nRF9160DK has a&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.3.0/nrf/working_with_nrf/nrf91/nrf9160.html#board-controller"&gt;board controller that controls the GPIO&lt;/a&gt;. Make sure to use pins that are not affected by this, more information found in &lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf91_dk/UG/nrf91_DK/board_controller.html"&gt;nRF9160DK Board Controller in our Infocenter&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Building ccs811 sensor Sample code on a nrf9160dk</title><link>https://devzone.nordicsemi.com/thread/416368?ContentTypeID=1</link><pubDate>Mon, 20 Mar 2023 18:51:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c03d252c-60d2-4943-acc7-d3c76c68a538</guid><dc:creator>kew_flex</dc:creator><description>&lt;p&gt;Thanks for your reply. I was going to use a breakout board for the ccs811 similar to this one -&amp;nbsp;&lt;a href="https://www.aliexpress.com/item/1005003517035515.html?spm=a2g0o.productlist.main.3.5fb736ddfyOJPe&amp;amp;algo_pvid=a0ecf4c7-2e67-4e9e-9db8-d8d2e6eaacbc&amp;amp;aem_p4p_detail=20230320114737871688017389200014973555&amp;amp;algo_exp_id=a0ecf4c7-2e67-4e9e-9db8-d8d2e6eaacbc-1&amp;amp;pdp_ext_f=%7B%22sku_id%22%3A%2212000026143190565%22%7D&amp;amp;pdp_npi=3%40dis%21NZD%2141.92%2141.92%21%21%21%21%21%40211beeec16793380573993658d06de%2112000026143190565%21sea%21NZ%210&amp;amp;curPageLogUid=pf2wUqzKRQKJ&amp;amp;ad_pvid=20230320114737871688017389200014973555_2&amp;amp;ad_pvid=20230320114737871688017389200014973555_2"&gt;link&lt;/a&gt;. I would have to use I2C to communicate with the board so should I instead be looking at the I2C examples instead of the ccs811 example? Or by adding the ccs811 to the board definition will it work?&lt;/p&gt;
&lt;p&gt;For building for the thingy52_nrf52832 I did not edit the build config in any way and it still seems to fail during the linking stage.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Building ccs811 sensor Sample code on a nrf9160dk</title><link>https://devzone.nordicsemi.com/thread/416301?ContentTypeID=1</link><pubDate>Mon, 20 Mar 2023 13:57:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0918ad63-2f11-46b7-9402-0cd15c95517e</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The nRF9160 DK does not have the sensor CCS811. In order to build the CCS811 sample for nRF9160DK, you will need to add this&amp;nbsp;to the board definition. Please note that you will need to build for nrf9160dk_nrf9160_ns&lt;/p&gt;
[quote user=""]but the other suggested board thingy52_nrf52832 also has the same build error as above.&amp;nbsp;[/quote]
&lt;p&gt;I had no issues building the CCS811 project for thingy52_nrf52832. Did you reconfigure the project in any way?&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>