Using Lego temperature sensor with Arduino I have Arduino mega and Lego temperature sensor which I would like to connect to the Arduino. I'm trying to use a I2C connection between them, with no luck. I connected the sensor and Arduino referring to the picture below:
I'm using the Wire library for transmitting data. This is my code currently:

#include &lt; Wire.h &gt;
byte ADDRESS=0x98;
byte CONFIG=0x01;
void setup(){
  Serial.begin(9600);
  Wire.begin();
  Wire.beginTransmission(ADDRESS);
  Wire.write(CONFIG);
  Wire.endTransmission();
  delay(100);
}
void loop(){
  Wire.beginTransmission(ADDRESS);
  Wire.write(CONFIG);
 Wire.endTransmission();
  Wire.requestFrom(ADDRESS,2);
  delay(100);
  int avail=Wire.available();
  Serial.println(avail);
  delay(100);
}


I found the config and address values from RobotC drivers for the same sensor. But all I get is zeros. Is there any way i could check for a defect sensor? Is my code correct?
I managed to get it work with the following code:

float getTemp(){
    #define ADDRESS 0x4C
    #define CONFIG 0x00
    float temp;
    Wire.beginTransmission(ADDRESS);
    Wire.write(CONFIG);
    Wire.endTransmission();
    delay(50);
    Wire.requestFrom(ADDRESS,2);
    temp=Wire.read();
    if(Wire.read()==128){
        temp+=0.5;
    }
    return temp;
}


And connect the green wire to 3.3V, not to the 5V.