# RFduino's Bluetooth client setup \[NEED HELP !!!!\]

**URL:** <https://forum.arduino.cc/t/rfduinos-bluetooth-client-setup-need-help/524837>\
**Category:** 3rd Party Boards\
**Created:** [May 8, 2018, 4:38am UTC](https://forum.arduino.cc/t/rfduinos-bluetooth-client-setup-need-help/524837 "2018-05-08T04:38:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yannkang](https://avatars.discourse-cdn.com/v4/letter/y/71e660/32.png) [@yannkang](https://forum.arduino.cc/u/yannkang)\
**Post date:** [May 8, 2018, 4:38am UTC](https://forum.arduino.cc/t/rfduinos-bluetooth-client-setup-need-help/524837/1 "2018-05-08T04:38:27Z")

</div>

```cpp
#include <RFduinoBLE.h>

#include<Wire.h>
const int MPU_addr=0x68;
int16_t axis_X,axis_Y,axis_Z;
int minVal=265;
int maxVal=402;
double x;
double y;
double z;
 
void setup(){
  Wire.begin();
  Wire.beginTransmission(MPU_addr);
  Wire.write(0x6B);
  Wire.write(0);
  Wire.endTransmission(true);
  Serial.begin(9600);
  RFduinoBLE.advertisementData = "xAng";
  RFduinoBLE.deviceName = "RFDUINO";
  RFduinoBLE.begin();
}
void loop(){
  Wire.beginTransmission(MPU_addr);
  Wire.write(0x3B);
  Wire.endTransmission(false);
  Wire.requestFrom(MPU_addr,14,true);
  axis_X=Wire.read()<<8|Wire.read();
  axis_Y=Wire.read()<<8|Wire.read();
  axis_Z=Wire.read()<<8|Wire.read();
    int xAng = map(axis_X,minVal,maxVal,-90,90);
    int yAng = map(axis_Y,minVal,maxVal,-90,90);
    int zAng = map(axis_Z,minVal,maxVal,-90,90);
      x= RAD_TO_DEG * (atan2(-yAng, -zAng)+PI);
      y= RAD_TO_DEG * (atan2(-xAng, -zAng)+PI);
      z= RAD_TO_DEG * (atan2(-yAng, -xAng)+PI);
    
 /* Serial.print("\n Angle x = ");
  Serial.print(x);
  Serial.println((char)176); */
  Serial.print("Angle y = ");
  Serial.print(y);
  Serial.println((char)176); 
 /* Serial.print("Angle z = ");
  Serial.print(z);
  Serial.println((char)176); */

  delay(1000);
}

```

I connected my RFduino with MPU6050. The problem I'm facing now is the bluetooth part. When I run this program, I can pair my computer with my rfduino. But I couldn't connect it to receive the data. What's wrong ? Do I need a specific program to activate the rfduino's bluetooth ?

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 6, 2021, 5:13pm UTC](https://forum.arduino.cc/t/rfduinos-bluetooth-client-setup-need-help/524837/2 "2021-05-06T17:13:26Z")

</div>


