Accelerometer dimu sensor


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);


Are you using RobotC?




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.