Files
libgy521/gy521example.c

15 lines
301 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, Temperature = %f\n", getAngleX(), getAngleY(), getAngleZ(), getTemp());
delay(100);
}
}