programming that can connect accelerometer to nRF Connect on iphone

include "BLESerial.h"

include "CurieIMU.h"

void setup() { pinMode(13, OUTPUT); //Serial.begin(115200);

//Serial.print("Initialize CurieIMU... "); CurieIMU.begin(); // Set the accelerometer range to 2G CurieIMU.setAccelerometerRange(2); // Set the gyro range to 250 degrees/second CurieIMU.setGyroRange(250); //Serial.println("Done!"); //Serial.print("Initialize Bluetooth Service... "); BLESerial.setName("Curie"); BLESerial.begin(); // Initialize BLESerial communication //Serial.println("Done!");

//Serial.println("Waiting for connections..."); while(!BLESerial); // Waiting for USB BLE-link connected //Serial.println("Connected!"); } void loop() { //scaled accelerometer values float ax, ay, az; //scaled Gyro values float gx, gy, gz;

// read accelerometer measurements from device, scaled to the configured range CurieIMU.readAccelerometerScaled(ax, ay, az); // read gyro measurements from device, scaled to the configured range CurieIMU.readGyroScaled(gx, gy, gz);

if(BLESerial.operator bool()) { digitalWrite(13, HIGH); // display tab-separated accelerometer x/y/z values BLESerial.print(ax); BLESerial.print("\t"); BLESerial.print(ay); BLESerial.print("\t"); BLESerial.print(az); BLESerial.print("\t"); // display tab-separated gyro x/y/z values BLESerial.print(gx); BLESerial.print("\t"); BLESerial.print(gy); BLESerial.print("\t"); BLESerial.print(gz); BLESerial.println(); } digitalWrite(13, LOW); }

Am not able to connect arduino 101 with my phone and get data through this programme

You need to edit your Original Post because you appear to be using BLE to connect to your phone and not an nRF24L01+. You cannot communicate with a phone with an nRF24.

And, sorry, I am not familiar with BLE.

To make it easier for people to help you please also modify your post and use the code button </> so your code looks like this and is easy to copy to a text editor. See How to use the Forum

…R

if(BLESerial.operator bool()) {

That's an interesting expression - what does it do?

Please remember to use code tags when posting code.