There is only one master on the bus. I have verified that i can do a write command since I was able to change the Address of the sensor from the default to the desired. I have also verified that i can begin accessing the device, since if(i2c.write((addressInner<<1), cmd, 1)==0) is triggered. I have also attempted to put the read command right after the write command in hopes that if START is followed right after STOP, it would be the same as REPEATED START:
i2c.write((addressInner<<1), cmd, 1);
i2c.read((addressInner<<1), temp1, 3);
Still no luck. It appears that another person using Arduino had an almost exact issue: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1214872633
Is it possible to change the way i2c.write and/or i2c.read command operates? I am thinking that if i could change i2c.read to include a part of i2c.write in it, thus removing the STOP that usually comes after i2c.write, I would be able to resolve my situation.
Any comments and insights are greatly welcomed as i am starting to run out of time, but would rather use I2C(SMbus) than PWM.
Thanks in advance
I have trouble reading from the MLX90614 sensor. It seems that when i2c.write command is issued to initate the i2c.read command, there is a stop bit sent after write and before read. Instead of stop bit, Master needs to send a repeated start bit and then issue i2c.read command. MLX90614 uses SMbus, which is very similar to I2C.
http://www.robot-electronics.co.uk/htm/using_the_i2c_bus.htm shows that the I2C protocol has the repeated start bit just like SMbus does.
MCU is NXP LPC1768