MLX90615

Hi, i`m having problem running MLX9016 IR sensor.

#include <Wire.h>
#define BLYNK_PRINT Serial

void setup() {
Wire.begin(); // join i2c bus default sda 4 ,scl 5. Else: Wire.begin(0, 2);
}
void loop() {

int TempLSB,TempMSB,PEC;
int TempRAW;
float Temperature;

Wire.beginTransmission(0x5b); // MLX90615 sensor address
Wire.write(0x13); // request RAM 0x6h – TA
Wire.requestFrom(0x5b, 3); // request 3 bytes from slave with addr 0x5B
TempLSB = Wire.read() ; // Read LSB of device temp from register
TempMSB = Wire.read() ; // Read MSB of device temp from register
PEC = Wire.read() ; // Read PEC
Wire.endTransmission();
TempRAW = TempMSB <<8 | TempLSB;
Temperature = (TempRAW * 0,02);
TempRAW=Temperature-273,15; // Calculate Device Temperature
Serial.begin(9600);
Serial.print(" MSB “);
Serial.println (TempMSB);
Serial.print(” LSB “);
Serial.println (TempLSB);
Serial.print(” Temperature ");
Serial.println (Temperature);
delay(2000);
}

Serial monitor returns:

MSB 255
LSB 255
Temperature 2.0

When you are learning to code it sometimes helps to turn on ALL compiler warnings in Preferences. This points out some of the things that you did that the compiler thinks might be mistakes. If you can figure out all of them an fix them it is more likely that your sketch will do what you intended.
For example, the compiler speaks American English so it uses a decimal point: ‘.’. If you put in a comma it means something completely different and is messing up your calculations.

/Users/john/Documents/Arduino/sketch_jun25a/sketch_jun25a.ino: In function 'void loop()':/Users/john/Documents/Arduino/sketch_jun25a/sketch_jun25a.ino:21:31: warning: left operand of comma operator has no effect [-Wunused-value]
   Temperature = (TempRAW * 0, 02);
                               ^

/Users/john/Documents/Arduino/sketch_jun25a/sketch_jun25a.ino:22:34: warning: right operand of comma operator has no effect [-Wunused-value]
   TempRAW = Temperature - 273, 15; // Calculate Device Temperature
                                  ^

/Users/john/Documents/Arduino/sketch_jun25a/sketch_jun25a.ino:9:25: warning: variable 'PEC' set but not used [-Wunused-but-set-variable]
   int TempLSB, TempMSB, PEC;
                         ^

Sketch uses 8,454 bytes (29%) of program storage space. Maximum is 28,672 bytes.Global variables use 399 bytes (15%) of dynamic memory, leaving 2,161 bytes for local variables. Maximum is 2,560 bytes.

And when you've fixed that, your I2C sequence looks wrong, you need to use wire.endTransmission(false) after you have sent the command to the device, then wait a few microseconds (see datasheet), then do the requestFrom() part.

There is a library for a similar component which might work, or at least give you an idea of how to communicate with it.

http://playground.arduino.cc/Code/MLX90614

Hint: Code tags would make things a lot easier to read rather than using a quote.

Thank you, this helped.