Files
libgy521/gy521example.c

15 lines
272 B
C

#include <stdio.h>
#include <wiringPi.h>
#include "libgy521.h"
int main(void) {
wiringPiSetup();
setupgy521();
while (1) {
printf("AngleX = %f, AngleY = %f, AngleZ = %f\n", getAngleX(), getAngleY(), getAngleZ());
delay(100);
}
}