<?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>Using Zephyr sensor driver - LPS22HB</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114895/using-zephyr-sensor-driver---lps22hb</link><description>Greetings 
 I have been going through the BLE fundamentals course, and I am currently on Lesson 4 exercise 1, which entails creating custom services. I have went through the exercise and can see it working perfectly. 
 However, I am trying to add the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 23 Sep 2024 15:27:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114895/using-zephyr-sensor-driver---lps22hb" /><item><title>RE: Using Zephyr sensor driver - LPS22HB</title><link>https://devzone.nordicsemi.com/thread/503437?ContentTypeID=1</link><pubDate>Mon, 23 Sep 2024 15:27:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53aa3547-4381-409e-aa7f-0b3669a0247e</guid><dc:creator>nordicator_prim3</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Did you make sure that you defined the device in a .dts overlay file?&lt;/p&gt;
&lt;p&gt;&lt;em&gt;CONFIG_LPS22HB&lt;/em&gt; needs &lt;em&gt;CONFIG_DT_HAS_ST_LPS22HB_PRESS_ENABLED&lt;/em&gt; which is automatically generated if a device with that matching compatible is present in the compiled .dts.&lt;/p&gt;
&lt;p&gt;I was able to get the same error as you if I didn&amp;#39;t mention the device in the .dts and the error went away by adding&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;&amp;amp;i2c0 {
	status = &amp;quot;okay&amp;quot;;
	pinctrl-0 = &amp;lt;&amp;amp;i2c0_default&amp;gt;;
	pinctrl-1 = &amp;lt;&amp;amp;i2c0_sleep&amp;gt;;
	pinctrl-names = &amp;quot;default&amp;quot;, &amp;quot;sleep&amp;quot;;

	my_lps: my_lps@1c {
		compatible=&amp;quot;st,lps22hb&amp;quot;;
		status=&amp;quot;okay&amp;quot;;
		reg=&amp;lt;0x1c&amp;gt;;
	};
};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>