get values mpu6050

I'm building a quadcopter with a mpu6050. I'm able to get the values from the mpu6050 from the gyro sketch.
In the sketch is writen:
Serial.print(F("accel x,y,z: "));
Serial.print(accel_t_gyro.value.x_accel, DEC);
Serial.print(F(", "));
Serial.print(accel_t_gyro.value.y_accel, DEC);
Serial.print(F(", "));
Serial.print(accel_t_gyro.value.z_accel, DEC);
Serial.println(F(""));
I want to use the printed value in a variable but when i use 'accel_t_gyro.value.x_accel' in a variable I get this error:

request for member 'value' in 'accel_t_gyro', which is of non-class type 'int'

How can I fix this?

Gyro.ino (31.6 KB)

Your attached sketch compiles for me with no errors.

Please try to trim your program down to the smallest possible one which shows the error, then paste it between [code][/code] tags instead of attaching it.

The error line was:
Int xas = map(accel_t_gyro.value.x_accel, - 40, 40, - 18000, - 18000)

lenny227:
The error line was:
Int xas = map(accel_t_gyro.value.x_accel, - 40, 40, - 18000, - 18000)

you might just try to multiply by 450 to get the same results

int xas = ccel_t_gyro.value.x_accel * 450

int has a small i
Z