Interface MLX90614 with mbed Board

Hi there,

i am pretty new to mbed…
I want to interface the MLX90614 I2C Sensor with my mbed board. It´s a custom board.

I also saw some Projects here but none of them worked for me. They are also very old like 4 Years ago. I use Mbed OS 6.2 and need some help to create a working code to get data from the sensor.

Could anyone help me?

Thank you

Hello Roland,

I not have your hardware so I can not verified what is working and what not, but maybe I can help you with start.
When you’re trying to do something like this then I suppouse you are able to run MbedOS on your board and you also tried MbedOS Blinky.

  • because you want to use I2C then you need a documentation for Mbed’s I2C API
  • do not forgot to use pull-up resistors if are not already implemented somewhere!
  • first what is good to do, is verified your I2C connection by simple check if your I2C master see some I2C Slave device on the bus. You can use this example code that will return an address if the conenction is OK.
  • I looked at some community libraries and this one looks very simple (I hope it will work).
  • beacuse the out is in floats and you probably want to see an output in the console, I also recommand to check this post.
  • if you want to try another library, then follow errors from the compiler and you must rework the code by hands and Mbed documentation. For example you want to avoid of usege some old APIs/functions what are not in the MbedOS6+ anymore - Serial API (replaced with BufferedSerial or UnbufferedSerial according to use) or the wait() function (replaced with thread_sleep_for(chronotime)) and so on.

BR, Jan