At the beginning of my code I start nine variables:
int16_t ax, ay, az;
int16_t gx, gy, gz;
int16_t xc, yc, zc;
Later on I collect the data from my gyro/accelerometer (the MPU6050):
accelgyro.getAcceleration(&ax, &ay, &az);
accelgyro.getRotation(&gx, &gy, &gz);
Now I would like to set the value of xc
to the sum of ax
and gx
.
Here is what I am currently using:
&xc == &ax & &gx;
So far this has not worked.