MLX 90614 problem

Hi,

Im using a MLX90614 sensor (connected to SDA/SCL) together with the Adafruit MLX library.
its works fine besides one thing, pin 0 and pin 1 are always HIGH (RX/TX). I would like to use them as IO pins for something but it doesnt work.

#include <Wire.h>
#include <Adafruit_MLX90614.h>

Adafruit_MLX90614 mlx = Adafruit_MLX90614();

void setup() {
  Serial.begin(9600);

  Serial.println("Adafruit MLX90614 test");  

  mlx.begin();  
  pinMode(0,OUTPUT);
}

void loop() {
  
  
  Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempC()); 
  Serial.print("*C\tObject = "); Serial.print(mlx.readObjectTempC()); Serial.println("*C");
  Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempF()); 
  Serial.print("*F\tObject = "); Serial.print(mlx.readObjectTempF()); Serial.println("*F");

  Serial.println();
  
  digitalWrite(0,LOW);
  delay(100);
  digitalWrite(0, HIGH);
  
  delay(500);
}

this is the example code and i included a simple blink sketch for testing.
...it wont blink, the LED is constantly ON and the RX led on my arduino is blinking too.
(same with PIN1)

does anyone have any ideas?

confusing info.. more needed.
Be aware that some of theese sensors av configured for PWM output. And then I2C wont work until reconfigured

knut_ny:
Be aware that some of theese sensors av configured for PWM output. And then I2C wont work until reconfigured

can you elaborate this? i dont quite understand what you mean.

knut_ny:
confusing info.. more needed.

its actually quite simple.
Pin 0 and 1 dont work while using this Sensor/Library. I have a constant Output on these pins, even i set them low.

Pin 0 and 1 dont work

Yes they do, they are used by serial I/O as soon as you issue the Serial.begin() call.

You cannot use an Arduino pin for two different functions at the same time.

I2c vs pwm is decribed in the datasheet.
If the sensor is set to pwm, u get pulses to read with the 'pulsein()' command