RBE2002FinalProject/IMU.cpp
// Reads x,y and z accelerometer registers
Reads x,y and z accelerometer registers
Reads x y and z accelerometer registers
void IMU::readAccel() {
  {
    accel.readAcc();
    accel_z = accel.a.z >> 4;
    accel_z = (accel_z / 256);
  }
}
void IMU :: readAccel ( ) { { accel . readAcc ( ) ; accel_z = accel . a . z >> 4 ; accel_z = ( accel_z / 256 ) ; } }
Reads x,y and z accelerometer registers
Reads x y and z accelerometer registers
//    accel_x = accel.a.x >> 4; // shift left 4 bits to use 12-bit representation (1 g = 256) //    accel_y = accel.a.y >> 4; // accelerations in G //    accel_x = (accel_x / 256); //    accel_y = (accel_y / 256);