This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Thsi code is taken from SensorMPU925X.java (PS-Lab android client) | |
scienceLab = ScienceLabCommon.scienceLab; | |
I2C i2c = scienceLab.i2c;// here i am trying to get i2c but it returns null | |
try { | |
if (i2c == null) throw new IOException("i2c not found"); // i add this line to check i2c is null or not | |
sensorMPU925X = new MPU925x(i2c); | |
} catch (IOException e) { | |
Log.d("ic2", "onCreate: "+e); | |
e.printStackTrace(); | |
} |