Melexis SMBus IR Thermometer - NFI

The errors indicate that - for some reason - your compiler cannot find the library you are trying to use.

First, I suggest that you try to place the "#include <i2cmaster.h>" line before the other includes as sometimes small things have surprisingly big consequences..

Second, you should recheck (once more) that you have put the "twimaster.cpp" and "i2cmaster.h" files it in a right place (i.e., /{arduino root}/hardware/libraries for older Arduino sw, /{arduino root}/libraries for the newer ones).

Inside the correct library folder you should see other folders, for example, "Servo", "SorftwareSerial", "Wire", etc.. I named my folder as "I2Cmaster" and put the two files inside that.

After that YOU HAVE TO create a separate file called "keywords.txt" inside the very same folder. You can copy/paste the lines that I have in my keyword file at the end of this post. Without this file the Arduino software cannot automatically figure out what you've defined in your library.. A bit stupid, yes, but that's the way it's done. The Arduino environment has to be closed (if running) as it is documented to find the new stuff only when started.

Given just a quick glance the code otherwise seems valid although it does not really show neither the readMLXtemperature(int) function nor where you call it. Just to check the other part of the code you can comment the function and the library include to see if it otherwise compiles ok.

#######################################
# Syntax I2Cmaster
#######################################

#######################################
# Datatypes (KEYWORD1)
#######################################

#######################################
# Methods and Functions (KEYWORD2)
#######################################
i2c_init            KEYWORD2
i2c_stop            KEYWORD2
i2c_start            KEYWORD2
i2c_rep_start      KEYWORD2
i2c_start_wait      KEYWORD2
i2c_write            KEYWORD2
i2c_readAck            KEYWORD2
i2c_readNak            KEYWORD2
i2c_read            KEYWORD2

#######################################
# Constants (LITERAL1)
#######################################