<?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>nRF52 SDK 2.2.0 Edit Zigbee Light Bulb example to use external I2C RGB LED Driver</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97319/nrf52-sdk-2-2-0-edit-zigbee-light-bulb-example-to-use-external-i2c-rgb-led-driver</link><description>Hi, 
 
 I&amp;#39;m pretty lost in the nRF52 SDK V2.2.0. I&amp;#39;ve managed to get my nRF52840 DK to connect to my existing Zigbee network using the Zigbee Light Bulb example. 
 Now I&amp;#39;m trying to make the example code use an external I2C RGB LED driver ( SM2135E )</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 09 Mar 2023 14:56:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97319/nrf52-sdk-2-2-0-edit-zigbee-light-bulb-example-to-use-external-i2c-rgb-led-driver" /><item><title>RE: nRF52 SDK 2.2.0 Edit Zigbee Light Bulb example to use external I2C RGB LED Driver</title><link>https://devzone.nordicsemi.com/thread/414424?ContentTypeID=1</link><pubDate>Thu, 09 Mar 2023 14:56:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4adb3cfb-5b85-4463-b425-ff094f353d55</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;The ticket will remain open if you want to keep it or you can create new ticket anytime.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 SDK 2.2.0 Edit Zigbee Light Bulb example to use external I2C RGB LED Driver</title><link>https://devzone.nordicsemi.com/thread/414330?ContentTypeID=1</link><pubDate>Thu, 09 Mar 2023 09:54:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:310bf55f-580b-45d9-ad55-7f87437621fb</guid><dc:creator>dan.r</dc:creator><description>&lt;p&gt;Thanks Naeem,&lt;/p&gt;
&lt;p&gt;That was an incredibly detailed reply, and I really appreciate it. I think I&amp;#39;ll need to go through the DevAccademy exercises to digest it.&lt;/p&gt;
&lt;p&gt;How long will this ticket stay open?&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Dan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 SDK 2.2.0 Edit Zigbee Light Bulb example to use external I2C RGB LED Driver</title><link>https://devzone.nordicsemi.com/thread/413565?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2023 13:54:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b2d8371-4810-4a38-87fa-0d4c5fde97d0</guid><dc:creator>Naeem Maroof</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you for contacting DevZone at NordicSemi.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As you want to you your own LED driver, and that connected to I2C bus, you can write an overlay to define your pin connections and then use zephyr constructs in your main code to get the device.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Typically, the hardware is described in header files in embedded firmware development. However, nRF Connect SDK uses a more structured and modular method to describe hardware that is based on Zephyr RTOS. It is done through the devicetree (DTS).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Devicetree is a data structure that describes the hardware (mcu, board, system, sensors etc.).&amp;nbsp;The devicetree uses a specific format consisting of nodes connected together, where each node contains a set of properties. When we use nRF SDK for nordic boards, the devicetree is provided (built-in) and you can see the compiled devicetree for your board in the VSCode Environment.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You can read more about devicetree here on devacademy.&amp;nbsp; &lt;a href="https://academy.nordicsemi.com/topic/devicetree/"&gt;https://academy.nordicsemi.com/topic/devicetree/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Using &lt;a href="https://academy.nordicsemi.com/topic/configuration-files/#:~:text=multi%2Dimage%20builds-,Devicetree%20overlays,-In%20lesson%202"&gt;devicetree overlays&lt;/a&gt;, we can update, modify and change the hardware. In the overlay, you only need to describe the node which you want to add.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;You can create an overlay &lt;a href="https://academy.nordicsemi.com/topic/i2c-driver/#:~:text=3.%20Specify%20which%20I2C%20controller%20your%20device%20(sensor)%20is%20connected%20to%20and%20its%20I2C%20address."&gt;like this&lt;/a&gt; by including your device/node.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Then you can use &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/dts/api/api.html#devicetree-api:~:text=View%20page%20source-,Devicetree%20API,%EF%83%81,-This%20is%20a"&gt;Zephyr Devicetree API&lt;/a&gt; to get the device and use it in your code. You will probably be using functions defined in &lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/main/include/zephyr/drivers/i2c.h"&gt;i2c.h&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You may also see &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/app_dev/pin_control/index.html"&gt;Zephyr RTOS API Pinctrl&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Naeem&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 SDK 2.2.0 Edit Zigbee Light Bulb example to use external I2C RGB LED Driver</title><link>https://devzone.nordicsemi.com/thread/413472?ContentTypeID=1</link><pubDate>Mon, 06 Mar 2023 10:19:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:13a095dc-0402-43a4-97a4-f019ca1834d3</guid><dc:creator>dan.r</dc:creator><description>&lt;p&gt;Are there any best practices to follow?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>