<?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>Hello I am using Uart exampl</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/8790/hello-i-am-using-uart-exampl</link><description>I want to send data without a computer from 3 ADC sensors. 
 using de ble uart. 
 How do I set my variable to send data? 
 I should use in ble_nus_string_send(&amp;amp;m_nus, data_array, index);? 
 Thank you</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 19 Aug 2015 07:36:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/8790/hello-i-am-using-uart-exampl" /><item><title>RE: Hello I am using Uart exampl</title><link>https://devzone.nordicsemi.com/thread/32247?ContentTypeID=1</link><pubDate>Wed, 19 Aug 2015 07:36:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:250c9182-dd79-4014-8a51-61a35a525fda</guid><dc:creator>Michael Dietz</dc:creator><description>&lt;p&gt;So you will read your sensors with SPI or TWI and eventually you will be ready to send the data you collected. This data will be sent over uart using&lt;/p&gt;
&lt;p&gt;err_code = ble_nus_string_send(&amp;amp;m_nus, data_array, index);&lt;/p&gt;
&lt;p&gt;Here m_nus is the structure to identify the Nordic UART Service. This is important but you shouldn&amp;#39;t have to touch it as it has been initialized in the example code.&lt;/p&gt;
&lt;p&gt;All you need to do is make sure the data you want to send is correctly stored in data_array. (Also note that the maximum number of data bytes you can send is 20 bytes at a time using ble_nus_string_send, unless you implement ble long write).&lt;/p&gt;
&lt;p&gt;index will be the number of bytes you are sending in this packet. So if you are sending 10 bytes of data (maybe 5 sensor readings) then index will equal 10.&lt;/p&gt;
&lt;p&gt;You shouldn&amp;#39;t have to mess with the ble_uart example code much at all to get this working. Just look at the contents of this function /**@snippet [Handling the data received over UART] */
void uart_event_handle(app_uart_evt_t * p_event) where the send data over ble_uart.&lt;/p&gt;
&lt;p&gt;and this function /**@snippet [Handling the data received over BLE] */
static void nus_data_handler(ble_nus_t * p_nus, uint8_t * p_data, uint16_t length)
where they receive data over ble_uart&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hello I am using Uart exampl</title><link>https://devzone.nordicsemi.com/thread/32246?ContentTypeID=1</link><pubDate>Wed, 19 Aug 2015 06:30:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd8d93df-2af9-4ed8-ad5e-eebcc278c489</guid><dc:creator>Hillel</dc:creator><description>&lt;p&gt;Hello and thank you.
de Example code Working good.
I do not need the side of the computer.
I would like to receive light sensor data and send them Using de BLE Uart.
i use de Uart As  platform for communication.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hello I am using Uart exampl</title><link>https://devzone.nordicsemi.com/thread/32245?ContentTypeID=1</link><pubDate>Tue, 18 Aug 2015 11:03:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d291fab-fc65-4db8-a299-a537b50cbf0d</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Are you trying to use two UARTs? The nRF51422 (and nRF51822) has one UART. Please see &lt;a href="https://devzone.nordicsemi.com/question/1346/nrf51822-how-many-uarts/"&gt;this&lt;/a&gt;. You can use ble_nus_string_send(). Is the nRF51422 able to receive the data from the sensors?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>