<?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 send 16 bit element array[10000] in BLE nus service in nrf52?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/24521/how-to-send-16-bit-element-array-10000-in-ble-nus-service-in-nrf52</link><description>Hello, 
 I am using 12 bit ADC in my application but data element more than 8bit is not send correctly, Also not receiving Array[10000] element. I am using nrf52. 
 Thank You,
Ram</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 Aug 2017 08:27:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/24521/how-to-send-16-bit-element-array-10000-in-ble-nus-service-in-nrf52" /><item><title>RE: How to send 16 bit element array[10000] in BLE nus service in nrf52?</title><link>https://devzone.nordicsemi.com/thread/96531?ContentTypeID=1</link><pubDate>Wed, 23 Aug 2017 08:27:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aebcf947-cfc6-4296-840b-729e638f3be9</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;So then mark the right answer!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send 16 bit element array[10000] in BLE nus service in nrf52?</title><link>https://devzone.nordicsemi.com/thread/96530?ContentTypeID=1</link><pubDate>Mon, 21 Aug 2017 14:53:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c73af9cb-8fa9-4634-8494-85d4920f536f</guid><dc:creator>RichieJH</dc:creator><description>&lt;p&gt;Several ways to do this, all of them covered numerous times in the forum.  I&amp;#39;m a fan of doing something like this for 16 bits or two bytes (from here you can work out the for loops and counters required)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nus_to_send_array[0] = (Array[0] &amp;amp; 0xFF00) &amp;gt;&amp;gt; 8;
nus_to_send_array[1] = (Array[0] &amp;amp; 0x00FF);
...
nus_to_send_array[18] = (Array[9] &amp;amp; 0xFF00) &amp;gt;&amp;gt; 8;
nus_to_send_array[19] = (Array[9] &amp;amp; 0x00FF);

ble_attempt_to_send(nus_to_send_array, sizeof(nus_to_send_array));
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send 16 bit element array[10000] in BLE nus service in nrf52?</title><link>https://devzone.nordicsemi.com/thread/96529?ContentTypeID=1</link><pubDate>Mon, 21 Aug 2017 14:16:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d982132f-27f5-4c85-acd7-d42ef8ebf007</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Sorry Ram, your question doesn&amp;#39;t make sense. You will need to tell us much more: what exactly are you doing, what FW/example project/stack/SDk version/HW you use, what steps pass and where you see the problem. If you just say &amp;quot;I&amp;#39;m trying to send lot of 12-bit ADC samples over NUS and I don&amp;#39;t see them on receiver&amp;#39;s side&amp;quot; then obviously the only answer is &amp;quot;you have some bug in your FW or flaw in your design, go back and debug&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>