Major bugfixes, added read_i2c_word_combined

This commit is contained in:
2016-09-10 15:25:15 +02:00
parent 457cc459cf
commit 3a7ab407c3
3 changed files with 56 additions and 35 deletions

View File

@@ -5,10 +5,11 @@
void printall(void) {
printf("---------------------------------------------\n");
printf("Accel: x=%i, y=%i, z=%i\n", getAccelerometerData('s', 0), getAccelerometerData('y', 0), getAccelerometerData('z', 0));
printf("Accel: x=%f, y=%f, z=%f\n", getAccelerometerData('x', 1), getAccelerometerData('y', 1), getAccelerometerData('z', 1));
printf("Accel Range: raw: %i, int: %i\n", readAccelerometerRange(1), readAccelerometerRange(0));
printf("Gyro: x=%i, y=%i, z=%i\n", getGyroscopeData('x'), getGyroscopeData('y'), getGyroscopeData('z'));
printf("Gyro: x=%f, y=%f, z=%f\n", getGyroscopeData('x'), getGyroscopeData('y'), getGyroscopeData('z'));
printf("Gyro Range: raw: %i, int: %i\n", readGyroscopeRange(1), readGyroscopeRange(0));
printf("Temp: %f\n", getTemp());
printf("---------------------------------------------\n");
}
@@ -21,6 +22,6 @@ int main(void) {
//printf("AngleX = %f, AngleY = %f, AngleZ = %f, Temperature = %f\n", getAngleX(), getAngleY(), getAngleZ(), getTemp());
//printf("Gyro: x=%i, y=%i, z=%i\n", getGyroscopeData('x'), getGyroscopeData('y'), getGyroscopeData('z'));
printall();
delay(100);
delay(500);
}
}