Accelerometer dimu sensor


#1

I’m using the dimu sensor for a blancing robot, I used the gyroscope sensor for it but now i want to use both sensors the gyroscope and the accelerometer, i try a program which i read both sensor and i watch the times and i saw that reading both sensors is too slow, is there a way to read faster the sensors I’m using this lines of code for reading the sensors:
x = DIMUreadAccelAxis8Bit(DIMU, DIMU_ACC_X_AXIS);
z = DIMUreadAccelAxis8Bit(DIMU, DIMU_ACC_Z_AXIS);
v_angular=-1.68*DIMUreadGyroAxis(DIMU, DIMU_GYRO_Z_AXIS);


#2

Are you using RobotC?


#3

Yes


#4

For the Gyro, there’s this function:

// Read the GYROSCOPE
// There are 3 ways to do this:
// All at once, very convenient if you need all 3
DIMUreadGyroAxes(DIMU, xvals[i], yvals[i], zvals[i]);

This reads all three axes of the Gyro at onnce

But not for the Accelerometer unfortunately.