Do you have access to an oscilloscope? If so, check the PWM output to see if that is also producing incorrect output and that will at least mean that you aren’t having an error with the I2C lines. You could also attach the PWM output and write some code to compute the duty cycle, but that is somewhat more work.
There seem to be a few things going on here. it looks like to me (a software guy):
The Sparkfun board uses 10k resistors, not 4.7 for i2c. (The blue board linked above uses 4.7k)
The IR sensor uses a repeat-start variant of the protocol, and the Sprkfun library we are using might not take this into account, which might be relevant on Non ATMega boards like the Adafruit M0.
Today’s task is to try with the Adafruit Library to see if that might be different. I know for a fact that begin() is different, as Sparkfun returns isConnected(), but Adafruit always returns true. I have seen situations where the sparkfun library returns false, but temperature readings still happen!!
Yeah I think the two hosts is your issue, he board has an Arduino on it and that’s also accessing the MLX90614.
What you really want is [SEN-09570, it’s just the bare MLX90614 sensor without anything else attached.
Don’t know if it will work but you could try putting the ATmega328 on the eval board into reset and see if that allows your other board to communicate with the sensor. Holding the reset button down all the time would accomplish that as well as connecting the reset pin on the 6 pin AVR programming header to ground.](https://www.sparkfun.com/products/9570)
The downside is the Sparkfun board works as long as you use the serial interface, but it consumes a serial port. Having a board that does both serial and i2c [reliably] is really what I was looking for since I only have to have one part to keep on hand and is really flexible.
Hopefully you’ll make a revision and update the documentation?
TS-Chris:
Yeah I think the two hosts is your issue, he board has an Arduino on it and that’s also accessing the MLX90614.
What you really want is [SEN-09570, it’s just the bare MLX90614 sensor without anything else attached.
Don’t know if it will work but you could try putting the ATmega328 on the eval board into reset and see if that allows your other board to communicate with the sensor. Holding the reset button down all the time would accomplish that as well as connecting the reset pin on the 6 pin AVR programming header to ground.[/quote]](https://www.sparkfun.com/products/9570)
You have the evaluation board, it’s not intended to be connected to another host via I2C, it has a host built in.
SDA and SCL are broken out for your convenience if you want to connect another I2C sensor to the board, they were not intended to connect to another host. Putting the ATmega328 into reset is a hack to allow connection to another host, another option would be to write your own firmware for the board that disables I2C so that another host can connect.