<?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>HOW TO GET INPUT FROM GPIO?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49420/how-to-get-input-from-gpio</link><description>Hi, 
 I want to get input from gpio from an external button. i try many syntaxes for getting input from gpio but nothing is work. 
 i try 
 nrf_gpio_pin_dir_get(12) 
 nrf_gpio_pin_sense_get(12) 
 nrf_gpio_pin_read(12) 
 
 i not get any output from it</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 Jul 2019 09:45:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49420/how-to-get-input-from-gpio" /><item><title>RE: HOW TO GET INPUT FROM GPIO?</title><link>https://devzone.nordicsemi.com/thread/198098?ContentTypeID=1</link><pubDate>Fri, 12 Jul 2019 09:45:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:254122a1-2d51-454b-a7e7-345fa9c44878</guid><dc:creator>fenil.patel</dc:creator><description>&lt;p&gt;i already read the documentation. this function give 1 if the logic level is high and 0 for logic level low.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HOW TO GET INPUT FROM GPIO?</title><link>https://devzone.nordicsemi.com/thread/197892?ContentTypeID=1</link><pubDate>Thu, 11 Jul 2019 14:05:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8eb1300a-b2fe-4e92-9f7a-601ba093882e</guid><dc:creator>awneil</dc:creator><description>[quote userid="80339" url="~/f/nordic-q-a/49420/how-to-get-input-from-gpio/197887"]i do as you tell me.[/quote]
&lt;p&gt;I didn&amp;#39;t &lt;em&gt;tell&lt;/em&gt; you anything;&amp;nbsp;I asked you to &lt;strong&gt;study the &lt;em&gt;documentation&lt;/em&gt;&lt;/strong&gt; - have you done that?&lt;/p&gt;
[quote userid="80339" url="~/f/nordic-q-a/49420/how-to-get-input-from-gpio/197887"]the status is printed 0 [/quote]
&lt;p&gt;So what did you expect?&lt;/p&gt;
&lt;p&gt;Again, what&amp;nbsp;does the&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;strong&gt;documentation&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;tell you?&lt;/p&gt;
&lt;p&gt;It&amp;#39;s no use just randomly throwing function calls together - you need to understand what those functions do!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HOW TO GET INPUT FROM GPIO?</title><link>https://devzone.nordicsemi.com/thread/197887?ContentTypeID=1</link><pubDate>Thu, 11 Jul 2019 13:58:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c067137-fe12-4d51-891f-4b383f9ff059</guid><dc:creator>fenil.patel</dc:creator><description>&lt;p&gt;i do as you tell me.&lt;/p&gt;
&lt;p&gt;nrf_gpio_cfg_input(01,NRF_GPIO_PIN_NOPULL);&lt;/p&gt;
&lt;p&gt;SEGGER_RTT_printf(0,&amp;quot;status%d\n&amp;quot;,nrf_gpio_pin_read(01));&lt;/p&gt;
&lt;p&gt;i write like this but the status is printed 0 on segger rtt .&lt;/p&gt;
&lt;p&gt;this not print high logic level.&lt;/p&gt;
&lt;p&gt;thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HOW TO GET INPUT FROM GPIO?</title><link>https://devzone.nordicsemi.com/thread/197631?ContentTypeID=1</link><pubDate>Wed, 10 Jul 2019 13:05:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d44b79d5-068a-4fe7-817f-d2af91261bd4</guid><dc:creator>awneil</dc:creator><description>[quote userid="80339" url="~/f/nordic-q-a/49420/how-to-get-input-from-gpio/197618"]nrf_gpio_pin_get([/quote]
&lt;p&gt;So what does the &lt;strong&gt;documentation&lt;/strong&gt; for that function tell you?&lt;/p&gt;
&lt;p&gt;How about&amp;nbsp;&lt;span&gt;&lt;strong&gt;nrf_gpio_pin_read()&lt;/strong&gt; ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/group__nrf__gpio__hal.html#ga76870ecdd68f3e26eeea7ea3c5ad6b55"&gt;infocenter.nordicsemi.com/.../group__nrf__gpio__hal.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HOW TO GET INPUT FROM GPIO?</title><link>https://devzone.nordicsemi.com/thread/197618?ContentTypeID=1</link><pubDate>Wed, 10 Jul 2019 12:20:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bfa08f08-6abc-4fb4-b865-f9c3f551c705</guid><dc:creator>fenil.patel</dc:creator><description>&lt;p&gt;thank you&lt;/p&gt;
&lt;p&gt;i know the loop&lt;/p&gt;
&lt;p&gt;but i did not get if button is pressed or not i am trying to read pin state using nrf_gpio_pin_get(14);&lt;/p&gt;
&lt;p&gt;but this not work.&lt;/p&gt;
&lt;p&gt;if you have any suggestion let me know.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HOW TO GET INPUT FROM GPIO?</title><link>https://devzone.nordicsemi.com/thread/197614?ContentTypeID=1</link><pubDate>Wed, 10 Jul 2019 12:04:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3823eb0d-a907-4de9-8a91-8f96d86706e1</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;while( true )
{
    if( button is pressed )
    {
        ++variable;
    }
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HOW TO GET INPUT FROM GPIO?</title><link>https://devzone.nordicsemi.com/thread/197613?ContentTypeID=1</link><pubDate>Wed, 10 Jul 2019 12:00:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5a38401-6f00-4240-bcbd-66382cc8b099</guid><dc:creator>fenil.patel</dc:creator><description>&lt;p&gt;i see the example but i want to increment variable continuously when an external button is pressed.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HOW TO GET INPUT FROM GPIO?</title><link>https://devzone.nordicsemi.com/thread/196994?ContentTypeID=1</link><pubDate>Mon, 08 Jul 2019 07:15:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6eead07c-acce-4edd-983a-b2452e5c8d64</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Have you tried the &amp;quot;pin_change_int&amp;quot; example?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HOW TO GET INPUT FROM GPIO?</title><link>https://devzone.nordicsemi.com/thread/196804?ContentTypeID=1</link><pubDate>Fri, 05 Jul 2019 11:09:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11e1ded4-1180-4757-80f3-967f9a2e64ed</guid><dc:creator>fenil.patel</dc:creator><description>&lt;p&gt;i look the bsp example. but nothing helped.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HOW TO GET INPUT FROM GPIO?</title><link>https://devzone.nordicsemi.com/thread/196802?ContentTypeID=1</link><pubDate>Fri, 05 Jul 2019 11:05:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4642a4f-347f-4c90-aa1c-5cb7ce70df48</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Have you looked at the examples in the SDK ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>