Library for MLX90614 on Arduino DUE


I found the following sketch ( MLX90614_Direct_Access.ino in;topic=144669.0;attach=37217) to work for my IR thermometer on arduino DUE. I would like to use it in some other code, and so I want to include in the arduino library. Could someone please help me with a library that gets the temperature reading in Celsius? Thanks

Did you see this Library/example sketch from sparkfun:

I think it's the same code I tried but it doesn't work on arduino due

I guess this is always the same issue: At the end of a Read, the Master must send a STOP before the next to last Byte or at the same time it sends a START if there is only one byte to read.

It seems that this code works for an MLX90614, #reply 4:

Thank you very much for the help. I have a working code for the IR thermometer for the arduino due from one of the forums. The challenge I have is how to convert the sketch to a library or a function so as to just call it in other sketches without having to write the code all over again in every sketch. Please I need your suggestion and explanations on how to go about this as I am new to arduino. Thanks

Will you please post (as attachment) the sketch that you have found and tested on you IRT (Infra Red Thermometer)?



Please find attached the code. thanks

MLX90614_Direct_Access.ino (3.41 KB)