<?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>Stream data over nRF52 Example?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/20930/stream-data-over-nrf52-example</link><description>Hello,
I would like to stream sensor data from the Bosch IMU sensor over BLE at a maximum rate. I can collect data over I2C from the sensor but would like to know if there is an example that I can use for a template to stream the data to an iPhone. I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 31 Mar 2017 10:31:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/20930/stream-data-over-nrf52-example" /><item><title>RE: Stream data over nRF52 Example?</title><link>https://devzone.nordicsemi.com/thread/81759?ContentTypeID=1</link><pubDate>Fri, 31 Mar 2017 10:31:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2720caf-c46c-4033-96d6-c7e23da20bd7</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I don&amp;#39;t think TWI0_CONFIG_SCL or TWI0_CONFIG_SDA used any where else in the code.
If you have a look at the twi_config() function in main.c you can find that SCL and SDA pin was configured to ARDUINO_SCL_PIN (27) and ARDUINO_SDA_PIN (26) .&lt;/p&gt;
&lt;p&gt;It&amp;#39;s important what you configured in the parameter you pass to in APP_TWI_INIT(). Those configured with that call will be used.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stream data over nRF52 Example?</title><link>https://devzone.nordicsemi.com/thread/81760?ContentTypeID=1</link><pubDate>Fri, 31 Mar 2017 09:29:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d4aec02-8bd2-4d72-9077-f54a5a5c3cf1</guid><dc:creator>GaryD</dc:creator><description>&lt;p&gt;The file was:
C:\NordicSDK11\examples\peripheral\twi_master_using_app_twi\config\twi_master_using_app_twi_pca10040\nrf_drv_config.h&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stream data over nRF52 Example?</title><link>https://devzone.nordicsemi.com/thread/81761?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2017 14:58:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d39068c7-bb17-4256-83d7-bfb70028be84</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;You can find the HID example in \examples\ble_peripheral\ble_app_hids_keyboard or \examples\ble_peripheral\ble_app_hids_mouse&lt;/p&gt;
&lt;p&gt;The I2C code above, please tell which file you get it from.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stream data over nRF52 Example?</title><link>https://devzone.nordicsemi.com/thread/81763?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2017 13:07:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f978d2a9-e5ee-4d8b-8a59-3764d1c67c64</guid><dc:creator>GaryD</dc:creator><description>&lt;p&gt;Thank you for the suggestion.  Can you also tell me which example(s) are in the SDK 11.0.0 that provide HID capability?&lt;/p&gt;
&lt;p&gt;I am also looking at the board configuration files nrf_drv_config.h.  Does the following code in the .h file indicate that the I2C pins are attached to GPIO 26 and GPIO 27?  I would like to know if I am interpreting the information correctly.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#if (TWI0_ENABLED == 1)
#define TWI0_USE_EASY_DMA 0

#define TWI0_CONFIG_FREQUENCY    NRF_TWI_FREQ_100K
#define TWI0_CONFIG_SCL 0x1b
#define TWI0_CONFIG_SDA 0x1a
#define TWI0_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW

#define TWI0_INSTANCE_INDEX      0
#endif
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Regards,
GaryD&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Stream data over nRF52 Example?</title><link>https://devzone.nordicsemi.com/thread/81762?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2017 12:05:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be11bd7d-13f6-4214-b8d4-34feaa98709b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;We do have HID examples in our SDK. It send mouse/keyboard data. But I guess in your case you want to use your own proprietary service to send data. My suggestion is to add your own service (or the UART service) to an HID project. This way you can take advantage of the low connection interval for HID device (11.25ms as you mentioned).&lt;/p&gt;
&lt;p&gt;To stream data, you can simply queue as much as possible notification until the buffer on the nRF5 full, and then wait for the BLE_GATTS_EVT_HVN_TX_COMPLETE event to start queuing again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>