public TMP007_Protocol()
{
i2c_TMP007 = I2C.wiringPiI2CSetup(TMP007);
}
data = I2C.wiringPiI2CReadReg16(getI2C_TMP007(),0x1F);
try {
bus01 = I2CFactory.getInstance(I2CBus.BUS_1);
}
catch(IOException ex)
{
System.err.println("Producing I2C bus failed !!");
}
try {
device.read(0x1E, buffer, 0, 2);
result = String.format("0x%04X", (int)(256*buffer[0]+buffer[1]));
}
catch( IOException ex)
{
result = "ERROR";
}