/** Verify the I2C connection. * Make sure the device is connected and responds as expected. * @return True if connection is valid, FALSE otherwise */ uint8_t MPU6050_TestConnection(void) { if(MPU6050_GetDeviceID() == 0x34) //0b110100; 8-bit representation in hex = 0x34 return TRUE; else return FALSE; }
/** Verify the I2C connection. * Make sure the device is connected and responds as expected. * @return True if connection is valid, FALSE otherwise */ int MPU6050_TestConnection() { if(MPU6050_GetDeviceID() == 0x34) //0b110100; 8-bit representation in hex = 0x34 return 1; else return 0; }
/** Verify the I2C connection. * Make sure the device is connected and responds as expected. * @return True if connection is valid, FALSE otherwise */ bool MPU6050_TestConnection() { if(MPU6050_GetDeviceID() == 0x34) //0b110100; 8-bit representation in hex = 0x34 return true; else return false; }
/** Verify the I2C connection. * Make sure the device is connected and responds as expected. * @return True if connection is valid, FALSE otherwise */ uint8_t MPU6050_TestConnection() { return(MPU6050_GetDeviceID() == 0x34 ? 1 : 0); /* 0b110100; 8-bit representation in hex = 0x34 */ }
/** Verify the I2C connection. * Make sure the device is connected and responds as expected. * @return True if connection is valid, FALSE otherwise */ bool MPU6050_TestConnection() { return MPU6050_GetDeviceID() == 0x34 ? TRUE : FALSE; //0b110100; 8-bit representation in hex = 0x34 }
/** Verify the I2C connection. * Make sure the device is connected and responds as expected. * @return True if connection is valid, FALSE otherwise */ bool MPU6050_TestConnection() { return MPU6050_GetDeviceID() == 0x34; }