how to use adt7420 using arduino?

hey i am using adt7420 temperature sensor for measuring the temperature of muscle but it can not show me the result.
i am uploading the code which i used.

#include <Wire.h>

#define ADT7420Address 0x48
#define ADT7420TempReg 0x00
#define ADT7420ConfigReg 0x03
long tempReading = 0;
float temp;

void setup()
{Serial.begin(9600);
Wire.begin();
Serial.println(“Starting…”);}

void loop()
{ readADT7420();
delay(1000); }

void readADT7420()
{
Wire.beginTransmission(ADT7420Address);
Wire.write(0x03);
Wire.write(B10100000); //Set 16bit mode and one-shot mode
Wire.endTransmission();
delay(250); //wait for sensor

byte MSB;
byte LSB;
// Send request for temperature register.
Wire.beginTransmission(ADT7420Address);
Wire.write(ADT7420TempReg);
Wire.endTransmission();
// Listen for and acquire 16-bit register address.
Wire.requestFrom(ADT7420Address,2);
MSB = Wire.read();
LSB = Wire.read();
// Assign global ‘tempReading’ the 16-bit signed value.
tempReading = ((MSB << 8) | LSB);
if (tempReading > 32768)
{tempReading = tempReading - 65535;
temp = (tempReading/128.0)*-1;}
else
{temp = (tempReading/128.0);}
Serial.print("Temperature: ");
Serial.println(temp,2);
}

please tell me the solution so that i can easily use this for my project.
Thank you :slight_smile:

What DOES it show?

Before answering please read:

http://forum.arduino.cc/index.php?topic=97455.0