title: Getting MPU6050 data through Arduino Micro Pro and Bluetooth
body: <p>I have a problem with getting sensor data from MPU6050 through Bluetooth module HC-06. I am using Arduino Micro Pro. I do not have a lot of experience, so it could be some rookie mistake. </p>
  
  <p>If I upload this code to Arduino, then connect via Bluetooth, I continuously receive "234" (I am using Tera Term):</p>
  
  
  
  <pre class="lang-cpp prettyprint-override"><code>void setup() {
    Serial1.begin(9600); 
    delay(50);
  }
  
  void loop() {
  
    Serial1.println("234");
    delay(500); 
  }
  </code></pre>
  
  <p>Also when I use this code without unplugging from PC, I correctly receive gyro and accelerometer data on serial monitor in Arduino IDE:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;Wire.h&gt;
  #include &lt;I2Cdev.h&gt;
  #include &lt;MPU6050.h&gt;
  
  MPU6050 mpu;
  int16_t ax, ay, az, gx, gy, gz;
  
  void setup() {
     Serial.begin(9600);
  
     Serial.println("a");
  
  
     Wire.begin();
  
     Serial.println("b");
  
     mpu.initialize();
  
     Serial.println("c");
  }
  
  void loop() {
    mpu.getMotion6(&amp;ax, &amp;ay, &amp;az, &amp;gx, &amp;gy, &amp;gz);
  
  
    Serial.print("hh");
    Serial.println(ax);
    delay(20);
  }
  </code></pre>
  
  <p>So all the hardware is supposedly working correctly. However, when I change all the <code>Serial</code> functions in the last example to <code>Serial1</code> and then try to get the data through Bluetooth, the Tera Term window just stays blank without any kind of data that I am aware of coming in.</p>
  
  <p>What am I doing wrong?</p>