<?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>Start program when gpio input is set Nrf51-dongle</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/32612/start-program-when-gpio-input-is-set-nrf51-dongle</link><description>Hi 
 We are trying a Nrf51-Dongle in a school prosject here in Norway We need to use one of the GPIO pins on the Nrf51-dongle as input When this input is 1 , we want the dongle to run the beacon program for sending notification to cellphone We having</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 22 Mar 2018 08:24:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/32612/start-program-when-gpio-input-is-set-nrf51-dongle" /><item><title>RE: Start program when gpio input is set Nrf51-dongle</title><link>https://devzone.nordicsemi.com/thread/125461?ContentTypeID=1</link><pubDate>Thu, 22 Mar 2018 08:24:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32bbad7a-6547-40ae-b0d1-584f68d53cde</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Are you working on mbed, or using our &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk/keydef/PLUGINS_ROOT/com.nordic.infocenter.sdk5.v12.3.0/index.html?cp=4_0_5"&gt;nRF5 SDK&lt;/a&gt;? There are multiple ways to achieve the functionality you want, but the simples might be to use &lt;a href="http://infocenter.nordicsemi.com/pdf/nRF51_RM_v3.0.1.pdf#page=70"&gt;GPIOTE&lt;/a&gt; to detect rising or falling edges on the GPIO, and call the softdevice functions for &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.api.v2.0.1/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html#gaa88eea8e9e95dd96a7633e2c62f3ce16"&gt;stopping&lt;/a&gt;&amp;nbsp;and &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s130.api.v2.0.1/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html#gab82c978db30188c7f4fbf2dac1d97720"&gt;starting&lt;/a&gt;&amp;nbsp;advertising in the interrupt handler. You can find an example of how to detect pin changes in &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.3.0/pin_change_int_example.html?cp=4_0_5_4_5_16"&gt;this example&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>