Hi,
The code you posted look like it is incomplete.
In my opinion, the following lines are missing:
int x, y, z;
void loop(void)
{ etc.
mag.getEvent(&event);this one is OK
x = event.magnetic.x;
y = event.magnetic.y;
z = event.magnetic.z;
etc.
}
Hi,
The code you posted look like it is incomplete.
In my opinion, the following lines are missing:
int x, y, z;
void loop(void)
{ etc.
mag.getEvent(&event);this one is OK
x = event.magnetic.x;
y = event.magnetic.y;
z = event.magnetic.z;
etc.
}