<?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>nRF Gpio configuration</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116590/nrf-gpio-configuration</link><description>Hi. i am trying to turn ON a LED1 and read its status and then turn ON LED2 based on status of LED1 in nrf52840dk board. 
 #define led1 28 #define led2 25 #define Button 12 
 int main(void) { NRF_LOG_INFO(&amp;quot;============================================</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 25 Nov 2024 12:47:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116590/nrf-gpio-configuration" /><item><title>RE: nRF Gpio configuration</title><link>https://devzone.nordicsemi.com/thread/511892?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2024 12:47:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80eb63ef-54ee-423a-b967-7fdbe1815de0</guid><dc:creator>Nishith</dc:creator><description>&lt;p&gt;okay. Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Gpio configuration</title><link>https://devzone.nordicsemi.com/thread/511824?ContentTypeID=1</link><pubDate>Mon, 25 Nov 2024 08:09:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8788f6cf-7df5-45e2-b46a-e6998141bd35</guid><dc:creator>Priyanka</dc:creator><description>&lt;p&gt;It can either cause GPIO to not work properly and also maybe give unexpected results.&lt;/p&gt;
&lt;p&gt;-Priyanka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Gpio configuration</title><link>https://devzone.nordicsemi.com/thread/511649?ContentTypeID=1</link><pubDate>Fri, 22 Nov 2024 12:39:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7f3e330-e822-48f4-ae4f-3800c61d9b5c</guid><dc:creator>Nishith</dc:creator><description>&lt;p&gt;Hi Priyanka&lt;br /&gt;&lt;br /&gt;Thanks for the reply. But what did you mean by unwanted behaviour. Will the Gpio stop working or will it only be a Gpio state reading issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Gpio configuration</title><link>https://devzone.nordicsemi.com/thread/511597?ContentTypeID=1</link><pubDate>Fri, 22 Nov 2024 06:38:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd140476-b872-4da3-a09e-b4660968ccf9</guid><dc:creator>Priyanka</dc:creator><description>&lt;p&gt;Hi Nishith,&lt;/p&gt;
&lt;p&gt;It is generally not recommended to set a single pin as both output and input as it can cause unwanted confusion and also maybe unwanted behaviour later on.&lt;/p&gt;
&lt;p&gt;You could maybe try to read the state of LED1 into a variable and then use this to control the LED2 state.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Priyanka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>