ESP8266 and MPU6050

Hello!
So, I am currently working on project in where I'm using two ESP8266's and an MPU6050 to gesture control a toy car. I managed to get the ESP8266's communicating with each other. One being the access point, the other being a station. However, I can't seem to get the MPU6050's accelerometer and gyroscope values sent to the station ESP8266. My main goal is to take the MPU6050's data and send it the station ESP8266, which in turn wirelessly send it to the access point ESP8266 to process. How could I possibly go about this? Perhaps set two variables as an array to keep track of X and Y axis?

Thanks!

Here are some useful tips for you. Read it, follow those guidelines, and you have a much better chance of getting help. Information as given is insufficient.

1. Include this Library in your IDE.

2. Make the following connection between ESP8266 and MPU6050
D5 (SDA) of ESP <--------------> SDA of MPU6050
D6 (SCL) of ESP <---------------> SCL of MU6050
G (GND) of ESP <----------------> GND of MPU6050
G (GND) of ESP <---------------> AD) of MPU6050 ; I2C address of MPU6050 is: 0x68 (hard coded in Library)

3. Upload the following sketch (taken from Library Examples and slightly modified for ESP) to measure/display temperature signal of MPU6050 om Serial Monitor at 1-sec interval (functional check of MPU6050).

#include <Wire.h>
#include <MPU6050.h>

MPU6050 mpu;

void setup() 
{
  Serial.begin(115200);
  Wire.begin(D5, D6);  //D5 = SDA, D6 = SCL; needed only for ESP8266
  Serial.println("Initialize MPU6050");

  while(!mpu.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G))
  {
    Serial.println("Could not find a valid MPU6050 sensor, check wiring!");
    delay(500);
  }
}

void loop()
{
  float temp = mpu.readTemperature();

  Serial.print(" Temp = ");
  Serial.print(temp);
  Serial.println(" *C");
  
  delay(1000);
}

4. Screenshot
MPUTemp.png

MPUTemp.png

Arduino-MPU6050-master.zip (27.7 KB)