<?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>Sending SAADC over BLE?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13092/sending-saadc-over-ble</link><description>I am trying to combine both the SAADC and BLE libraries to be able to read a value from my sensor on the analog pin and then send it over Bluetooth LE to a central dongle. 
 I have experimented with the /examples/peripheral/saadc example as well as the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 10 May 2017 09:15:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13092/sending-saadc-over-ble" /><item><title>RE: Sending SAADC over BLE?</title><link>https://devzone.nordicsemi.com/thread/49930?ContentTypeID=1</link><pubDate>Wed, 10 May 2017 09:15:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d7f9e12-d5e5-4d72-b887-9087da375b53</guid><dc:creator>akshaey</dc:creator><description>&lt;p&gt;Hi can anyone of you tell me, i used your program for saadc to uart over ble on sdk 11, the uart terminal on my computer is showing correct values from the board (COM), but the uart terminal on nrf toolbox app on my phone shows random garbage values, how to correct that so that i can send the values captured my sensor via ble to mobile app?&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending SAADC over BLE?</title><link>https://devzone.nordicsemi.com/thread/49929?ContentTypeID=1</link><pubDate>Tue, 19 Apr 2016 12:26:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:846f73e0-5831-4307-b180-cfe5e39b951e</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi Filip&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see the example stopping after 135 events on my side using PCA10040 v1.1.0 with rev 1 nRF52832 on board. Are you using the same?&lt;/p&gt;
&lt;p&gt;I tried to run the ble_app_uart_c example on my pca10028 board and got it to work right away with the ble_app_uart__saadc_timer_driven example. I connect to a uart terminal program (Realterm in my case) and the output appeared to be rubbish because it was diplaying the result as ASCII characters. If changed display settings to show hex values instead, it shows the correct values. Could that be the problem in your case as well?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending SAADC over BLE?</title><link>https://devzone.nordicsemi.com/thread/49928?ContentTypeID=1</link><pubDate>Sun, 17 Apr 2016 18:43:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65c6ac5c-8e13-45eb-a887-d70d048a303e</guid><dc:creator>Filip</dc:creator><description>&lt;p&gt;Also, the peripheral board with the sensor stops printing out readings after event #135.  Is this normal and can I allow it to keep going further?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending SAADC over BLE?</title><link>https://devzone.nordicsemi.com/thread/49927?ContentTypeID=1</link><pubDate>Sun, 17 Apr 2016 18:35:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16391bf1-58a1-48e7-84b2-53cb646b478b</guid><dc:creator>Filip</dc:creator><description>&lt;p&gt;Ok I got my new board in and it is working perfectly over UART so thank you for that!  However, when I run &amp;quot;/examples/ble_central/ble_app_uart_c/pca10028&amp;quot; (also tried the pca10031) on my nRF51 Dongle, it spits out garbage for each value.  I have identified it is on this code, but am not sure why it is wrong.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;for (uint32_t i = 0; i &amp;lt; p_ble_nus_evt-&amp;gt;data_len; i++)
       {
             while(app_uart_put( p_ble_nus_evt-&amp;gt;p_data[i]) != NRF_SUCCESS);
       }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Thanks so much!  This is the last piece and I will be there! :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending SAADC over BLE?</title><link>https://devzone.nordicsemi.com/thread/49926?ContentTypeID=1</link><pubDate>Wed, 13 Apr 2016 08:13:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f71509de-6831-4e62-944a-7e22c5cf24a0</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;That is safe. That method I usually use to test the ADC is to short the configured AIN pin to GND or VDD.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending SAADC over BLE?</title><link>https://devzone.nordicsemi.com/thread/49925?ContentTypeID=1</link><pubDate>Tue, 12 Apr 2016 17:40:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2237dff-2b13-4827-9ef9-d8f92d56bba1</guid><dc:creator>Filip</dc:creator><description>&lt;p&gt;Stefan, You are probably right about the diode being shorted so I just ordered another development board as I want to ensure that I have removed any other variables from the problem.  When I get the new board it is safe to connect VDD directly to the AIN0, correct?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending SAADC over BLE?</title><link>https://devzone.nordicsemi.com/thread/49924?ContentTypeID=1</link><pubDate>Tue, 12 Apr 2016 16:26:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:234901c1-c775-4838-b7ab-d4431dee9099</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;No , this is not normal that you do not get maximum reading on the SAADC. However, you should not expose such high voltage to the GPIO pins. You should not expose more than VDD+0.3V, i.e. supply voltage +0.3V, as stated in the &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.0/abs_max_ratings.html?cp=1_2_0_3#abs_max_ratings"&gt;absolute maximum ratings&lt;/a&gt; for the nRF52832.  Perhaps the ESD diode on GPIO pin P0.02 is shorted already. Try to configure another analog input pin for the SAADC and measure voltage on that pin instead.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending SAADC over BLE?</title><link>https://devzone.nordicsemi.com/thread/49923?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2016 23:36:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f7b95e4-012a-4d73-8441-e2adc19e5417</guid><dc:creator>Filip</dc:creator><description>&lt;p&gt;Wow Stefan this is wonderful!  I downloaded the code and ran it, and it is working perfectly!  I am going to read through the code thoroughly to understand how you got it to work versus what I had been attempting.&lt;/p&gt;
&lt;p&gt;However, I do have one question: the analog results that I am getting are very bad.  For instance, running your code gives me values between 20 and 30 for the output and when I directly apply 5V to AIN0/P0.02 it goes up to 587.  Shouldn&amp;#39;t the range be between about 0 and 1023?&lt;/p&gt;
&lt;p&gt;Also, utilizing the circuit diagram here (&lt;a href="https://www.sparkfun.com/tutorials/389)"&gt;www.sparkfun.com/.../389)&lt;/a&gt; the values don&amp;#39;t have a noticeable difference in the example, but when I use an Arduino they do.  Is my only option to use larger gains and account for the fact that a lot of noise will always exist?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending SAADC over BLE?</title><link>https://devzone.nordicsemi.com/thread/49922?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2016 15:20:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4b18396-2d6f-4bff-a64d-2a76698aad9e</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi Filip&lt;/p&gt;
&lt;p&gt;Below is an example which is a ble_app_uart example combined with the SAADC example. It is based on nRF5 SDK 11.0.0 and I have tested it with softdevice S132 2.0.0 and the PCA10040 development board.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_app_5F00_uart_5F005F00_saadc_5F00_timer_5F00_driven.zip"&gt;ble_app_uart__saadc_timer_driven.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The example samples on pin AIN0/P0.02 and outputs the result both on hardware UART and transfers it over BLE via the NUS service. You can adjust the samling rate by adjusting the &lt;code&gt;SAADC_SAMPLE_RATE_DIVIDER&lt;/code&gt; constant and you can adjust the size of the SAADC RAM buffer by adjusting the &lt;code&gt;SAADC_SAMPLES_IN_BUFFER&lt;/code&gt; constant.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending SAADC over BLE?</title><link>https://devzone.nordicsemi.com/thread/49921?ContentTypeID=1</link><pubDate>Mon, 11 Apr 2016 01:23:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed0ab99e-e0b5-42a6-b5ef-7a79547e2b0a</guid><dc:creator>Filip</dc:creator><description>&lt;p&gt;I just figured out that changing the timer for the saadc events from Timer 0 to Timer 3 made the UART output not be garbage.  However, the UART output goes extremely fast (compared to the plain saadc example) and the value returned is always 16380.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>