<?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>Send notification from Nrf51 dongle to cell phone over bluetooth ?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/32105/send-notification-from-nrf51-dongle-to-cell-phone-over-bluetooth</link><description>Hi i am doing a prosject to get notification on cell phone when i get mail in my postbox (postbox outside the house) I am using a nRF51 dongle, and want it to connect to cellphone (bluetooth), and send notification if a variable value have been changed</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 09 Apr 2018 10:26:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/32105/send-notification-from-nrf51-dongle-to-cell-phone-over-bluetooth" /><item><title>RE: Send notification from Nrf51 dongle to cell phone over bluetooth ?</title><link>https://devzone.nordicsemi.com/thread/127392?ContentTypeID=1</link><pubDate>Mon, 09 Apr 2018 10:26:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a98abfc2-b169-441d-a318-40a9cccbd5bf</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;You should be able to use any of the examples, and change the pin numbers to the pin numbers that are marked on the dongle.&lt;/p&gt;
&lt;p&gt;what you need to do is to change the define in the preprocessor defines that decides what board you are working on. Start with an example for the&amp;nbsp;PCA10036, and change the define&amp;nbsp;BOARD_PCA10036 to BOARD_PCA10031. If you get any errors when compiling, it will probably tell you what you have to change. Typically it is due to the number of LEDs or buttons on the board.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send notification from Nrf51 dongle to cell phone over bluetooth ?</title><link>https://devzone.nordicsemi.com/thread/125361?ContentTypeID=1</link><pubDate>Wed, 21 Mar 2018 13:17:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3449f8e-3c78-4adf-82ce-ef636586cfb1</guid><dc:creator>aleks</dc:creator><description>&lt;p&gt;Any good example of get the GPIOs on the nrf51-dongle to work ?&lt;br /&gt;&lt;br /&gt;thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Send notification from Nrf51 dongle to cell phone over bluetooth ?</title><link>https://devzone.nordicsemi.com/thread/124645?ContentTypeID=1</link><pubDate>Thu, 15 Mar 2018 18:02:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ff2496d-22b5-4051-8a52-e92134e719be</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;As far as I understand, the device works by that it waits for a trigger pulse from the controller, then it does it measurements, and then it sends a pulse back through the &amp;quot;echo&amp;quot; pin. So you will need to connect at least these two.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have not tested this sensor, but it looks like you can connect these pins to any of the gpios. Let us say that you set Trig to 16 and Echo to 17.&lt;/p&gt;
&lt;p&gt;Since this is very short intervals, I would look into using the PPI.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/31986/is-there-possible-to-get-timer-period-shorter-than-12us-with-nrf51-and-sdk-14" target="_blank" rel="noopener noreferrer"&gt;Here&lt;/a&gt; is a case where I recently posted an example using the PPI with the nRF51. It only controls pins using the timer, but it is possible to reverse it for one of the pins. And use the pin as a trigger/task to start/stop and measure the&amp;nbsp;pulse on the echo pin.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This can be done something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    NRF_PPI-&amp;gt;CH[SOME_CHANNEL_1].TEP = (uint32_t)&amp;amp;NRF_GPIOTE-&amp;gt;EVENTS_IN[GPIOTE_CONFIG];
    NRF_PPI-&amp;gt;CH[SOME_CHANNEL_1].EEP = (uint32_t)&amp;amp;NRF_TIMER0-&amp;gt;TASKS_START;
    NRF_PPI-&amp;gt;CH[SOME_CHANNEL_2].TEP = (uint32_t)&amp;amp;NRF_GPIOTE-&amp;gt;EVENTS_IN[GPIOTE_CONFIG];
    NRF_PPI-&amp;gt;CH[SOME_CHANNEL_2].EEP = (uint32_t)&amp;amp;NRF_TIMER0-&amp;gt;TASKS_CAPTURE[2];&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Then you can read the capture register using&lt;/p&gt;
&lt;p&gt;uint32_t captured_ticks = NRF_TIMER0-&amp;gt;CC[2];&lt;/p&gt;
&lt;p&gt;from your application.&lt;/p&gt;
&lt;p&gt;You will also have to stop and reset the timer after the CC register is written, so that it starts from 0 the next time you send a trigger pulse.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Play around with it, and see if you manage to get some readings from your application.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For the BLE part, you have many options. You can e.g. check out the ble_app_uart example from our SDK.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note: To use the nRF51, you will have to use SDK12.3.0 or older. I recommend using 12.3.0.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>