I am trying to combine a MLX90614 evaluation board with a Micro OLED to display the temperature recorded by the MLX90614 evaluation board and use it as a infrared thermometer. So while doing this I am facing some problems as well as questions.
As a background, I have tested and followed the Micro OLED breakout guide and managed to get it work to SPI mode, as for I2C mode, I have set the corresponding jumpers but when I compile the example code, it says compiled successfully but no display on. Anyone has any insights on this.
Another question is regarding the MLX90614 evaluation board, when I connect the FTDI basic to the MLX90614 evaluation board and subsequently plus this into my computer, when I open the serial monitor on arduino IDE, the Object and Ambient temperature is displayed, is this normal?
Finally, I am trying to combine the MLX90614 evaluation board and Micro OLED together as a whole circuit alongside with a switch then a battery (can a 9v Battery be used given that the voltage required but resistance is present between wires)? More specifically, it is the combination of MICRO oled display with the MLX90614 evaluation board which I need help with. Anyone has any insights on these?
Additionally, when I am testing the MLX90614 as a single unit itself I face the following error message on Arduino IDE Mac when I compile the example code for MLX90614_Serial_Demo:
Example code:
/******************************************************************************
MLX90614_Serial_Demo.ino
Serial output example for the MLX90614 Infrared Thermometer
This example reads from the MLX90614 and prints out ambient and object
temperatures every half-second or so. Open the serial monitor and set the
baud rate to 9600.
Hardware Hookup (if you're not using the eval board):
MLX90614 ------------- Arduino
VDD ------------------ 3.3V
VSS ------------------ GND
SDA ------------------ SDA (A4 on older boards)
SCL ------------------ SCL (A5 on older boards)
An LED can be attached to pin 8 to monitor for any read errors.
Jim Lindblom @ SparkFun Electronics
October 23, 2015
https://github.com/sparkfun/SparkFun_MLX90614_Arduino_Library
Development environment specifics:
Arduino 1.6.5
SparkFun IR Thermometer Evaluation Board - MLX90614
******************************************************************************/
#include <Wire.h> // I2C library, required for MLX90614
#include <SparkFunMLX90614.h> // SparkFunMLX90614 Arduino library
IRTherm therm; // Create an IRTherm object to interact with throughout
const byte LED_PIN = 8; // Optional LED attached to pin 8 (active low)
void setup()
{
Serial.begin(9600); // Initialize Serial to log output
therm.begin(); // Initialize thermal IR sensor
therm.setUnit(TEMP_F); // Set the library's units to Farenheit
// Alternatively, TEMP_F can be replaced with TEMP_C for Celsius or
// TEMP_K for Kelvin.
pinMode(LED_PIN, OUTPUT); // LED pin as output
setLED(LOW); // LED OFF
}
void loop()
{
setLED(HIGH); //LED on
// Call therm.read() to read object and ambient temperatures from the sensor.
if (therm.read()) // On success, read() will return 1, on fail 0.
{
// Use the object() and ambient() functions to grab the object and ambient
// temperatures.
// They'll be floats, calculated out to the unit you set with setUnit().
Serial.print("Object: " + String(therm.object(), 2));
Serial.write('°'); // Degree Symbol
Serial.println("F");
Serial.print("Ambient: " + String(therm.ambient(), 2));
Serial.write('°'); // Degree Symbol
Serial.println("F");
Serial.println();
}
setLED(LOW);
delay(500);
}
void setLED(bool on)
{
if (on)
digitalWrite(LED_PIN, LOW);
else
digitalWrite(LED_PIN, HIGH);
}
ERROR MESSAGE:
Arduino: 1.8.13 (Mac OS X), Board: "Arduino Uno"
/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/arduino-builder -dump-prefs -logger=machine -hardware /private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware -tools /private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/tools-builder -tools /private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/tools/avr -built-in-libraries /private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/libraries -libraries /Users/evansoo/Documents/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=0000_0000 -ide-version=10813 -build-path /var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/arduino_build_883984 -warnings=none -build-cache /var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/arduino_cache_699043 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.arduinoOTA.path=/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avr-gcc.path=/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/tools/avr -verbose /Users/evansoo/Documents/Arduino/libraries/SparkFun_MLX90614_Arduino_Library-master/examples/MLX90614_Serial_Demo/MLX90614_Serial_Demo.ino
/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/arduino-builder -compile -logger=machine -hardware /private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware -tools /private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/tools-builder -tools /private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/tools/avr -built-in-libraries /private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/libraries -libraries /Users/evansoo/Documents/Arduino/libraries -fqbn=arduino:avr:uno -vid-pid=0000_0000 -ide-version=10813 -build-path /var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/arduino_build_883984 -warnings=none -build-cache /var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/arduino_cache_699043 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.arduinoOTA.path=/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avr-gcc.path=/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/tools/avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/tools/avr -verbose /Users/evansoo/Documents/Arduino/libraries/SparkFun_MLX90614_Arduino_Library-master/examples/MLX90614_Serial_Demo/MLX90614_Serial_Demo.ino
Using board 'uno' from platform in folder: /private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr
Using core 'arduino' from platform in folder: /private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr
Detecting libraries used...
/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard /var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/arduino_build_883984/sketch/MLX90614_Serial_Demo.ino.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
Alternatives for Wire.h: [Wire@1.0]
ResolveLibrary(Wire.h)
-> candidates: [Wire@1.0]
/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard -I/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire/src /var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/arduino_build_883984/sketch/MLX90614_Serial_Demo.ino.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
Alternatives for SparkFunMLX90614.h: [SparkFun_MLX90614_Arduino_Library-master@1.0.3]
ResolveLibrary(SparkFunMLX90614.h)
-> candidates: [SparkFun_MLX90614_Arduino_Library-master@1.0.3]
/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard -I/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire/src -I/Users/evansoo/Documents/Arduino/libraries/SparkFun_MLX90614_Arduino_Library-master/src /var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/arduino_build_883984/sketch/MLX90614_Serial_Demo.ino.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
Using cached library dependencies for file: /private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire/src/Wire.cpp
Using cached library dependencies for file: /private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire/src/utility/twi.c
/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard -I/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire/src -I/Users/evansoo/Documents/Arduino/libraries/SparkFun_MLX90614_Arduino_Library-master/src /Users/evansoo/Documents/Arduino/libraries/SparkFun_MLX90614_Arduino_Library-master/src/SparkFunMLX90614.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
Generating function prototypes...
/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard -I/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire/src -I/Users/evansoo/Documents/Arduino/libraries/SparkFun_MLX90614_Arduino_Library-master/src /var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/arduino_build_883984/sketch/MLX90614_Serial_Demo.ino.cpp -o /var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/arduino_build_883984/preproc/ctags_target_for_gcc_minus_e.cpp -DARDUINO_LIB_DISCOVERY_PHASE
/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/tools-builder/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/arduino_build_883984/preproc/ctags_target_for_gcc_minus_e.cpp
Compiling sketch...
/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard -I/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire/src -I/Users/evansoo/Documents/Arduino/libraries/SparkFun_MLX90614_Arduino_Library-master/src /var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/arduino_build_883984/sketch/MLX90614_Serial_Demo.ino.cpp -o /var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/arduino_build_883984/sketch/MLX90614_Serial_Demo.ino.cpp.o
Compiling libraries...
Compiling library "Wire"
Using previously compiled file: /var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/arduino_build_883984/libraries/Wire/Wire.cpp.o
Using previously compiled file: /var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/arduino_build_883984/libraries/Wire/utility/twi.c.o
Compiling library "SparkFun_MLX90614_Arduino_Library-master"
/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/cores/arduino -I/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/variants/standard -I/private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire/src -I/Users/evansoo/Documents/Arduino/libraries/SparkFun_MLX90614_Arduino_Library-master/src /Users/evansoo/Documents/Arduino/libraries/SparkFun_MLX90614_Arduino_Library-master/src/SparkFunMLX90614.cpp -o /var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/arduino_build_883984/libraries/SparkFun_MLX90614_Arduino_Library-master/SparkFunMLX90614.cpp.o
In file included from /Users/evansoo/Documents/Arduino/libraries/SparkFun_MLX90614_Arduino_Library-master/src/SparkFunMLX90614.cpp:17:0:
/Users/evansoo/Documents/Arduino/libraries/SparkFun_MLX90614_Arduino_Library-master/src/SparkFunMLX90614.cpp: In member function 'uint8_t IRTherm::sleep()':
/Users/evansoo/Documents/Arduino/libraries/SparkFun_MLX90614_Arduino_Library-master/src/SparkFunMLX90614.h:30:15: error: 'digitalPinToPinName' was not declared in this scope
#define SCL (digitalPinToPinName(PIN_WIRE_SCL))
^
/Users/evansoo/Documents/Arduino/libraries/SparkFun_MLX90614_Arduino_Library-master/src/SparkFunMLX90614.cpp:276:10: note: in expansion of macro 'SCL'
pinMode(SCL, OUTPUT);
^~~
/Users/evansoo/Documents/Arduino/libraries/SparkFun_MLX90614_Arduino_Library-master/src/SparkFunMLX90614.h:30:15: note: suggested alternative: 'digitalPinToBitMask'
#define SCL (digitalPinToPinName(PIN_WIRE_SCL))
^
/Users/evansoo/Documents/Arduino/libraries/SparkFun_MLX90614_Arduino_Library-master/src/SparkFunMLX90614.cpp:276:10: note: in expansion of macro 'SCL'
pinMode(SCL, OUTPUT);
^~~
/Users/evansoo/Documents/Arduino/libraries/SparkFun_MLX90614_Arduino_Library-master/src/SparkFunMLX90614.cpp: In member function 'uint8_t IRTherm::wake()':
/Users/evansoo/Documents/Arduino/libraries/SparkFun_MLX90614_Arduino_Library-master/src/SparkFunMLX90614.h:30:15: error: 'digitalPinToPinName' was not declared in this scope
#define SCL (digitalPinToPinName(PIN_WIRE_SCL))
^
/Users/evansoo/Documents/Arduino/libraries/SparkFun_MLX90614_Arduino_Library-master/src/SparkFunMLX90614.cpp:285:10: note: in expansion of macro 'SCL'
pinMode(SCL, INPUT); // SCL high
^~~
/Users/evansoo/Documents/Arduino/libraries/SparkFun_MLX90614_Arduino_Library-master/src/SparkFunMLX90614.h:30:15: note: suggested alternative: 'digitalPinToBitMask'
#define SCL (digitalPinToPinName(PIN_WIRE_SCL))
^
/Users/evansoo/Documents/Arduino/libraries/SparkFun_MLX90614_Arduino_Library-master/src/SparkFunMLX90614.cpp:285:10: note: in expansion of macro 'SCL'
pinMode(SCL, INPUT); // SCL high
^~~
Using library Wire at version 1.0 in folder: /private/var/folders/lm/_yd7wz4x21vfrn9rjpxtbz480000gn/T/AppTranslocation/479406B4-7227-4C12-852C-1CE8C77B7B8A/d/Arduino.app/Contents/Java/hardware/arduino/avr/libraries/Wire
Using library SparkFun_MLX90614_Arduino_Library-master at version 1.0.3 in folder: /Users/evansoo/Documents/Arduino/libraries/SparkFun_MLX90614_Arduino_Library-master
exit status 1
Error compiling for board Arduino Uno.
Thank you. However, I am using a sparkfun product and also combining the display running in SPI mode with the evaluation board running in i2c. How do I do the connections and code?
Hi, thank you for your reply. I have managed to compile the Sparkfun Library. If that’s the case I would like to check how did you all connect the MLX90614 evaluation board + Micro OLED breakout in the image shown in MLX90614 hookup guide? I’m also seeking help to anyone who has managed to display the temperature recorded by a MLX90614 evaluation board and display it on MICROOLED
I’m afraid I don’t have connections or code for that, the image in the hookup guide was just an example of what you could build.
You will need to write your own code and figure out how to connect things on your own as we don’t have a guide for these specific parts used in combination.
Hi, thank you for your reply, I was hoping I could get support since I bought your items and your guide says can make make an IR thermometer but does not show how to. ON a side note, how to power up Micro OLED breakout display in i2c mode? I have soldered jumpers and followed connections and ran test code but to no avail.
Hi, thank you for your reply, I was hoping I could get support since I bought your items and your guide says can make make an IR thermometer but does not show how to.
You will need to write your own code and figure out how to connect things on your own as we do not have a guide for these specific parts used in combination.
how to power up Micro OLED breakout display in i2c mode
Please see the [hookup guide for information about how to use the Micro OLED. Remember that if you use it in I2C mode, you will need to run the appropriate sketch and you may need to edit the sketch to match the configuration you have set the OLED too.
Update: anyone know how to modify this code so that My MLX90614 can read a temperature that is 2 degree celsius more? Because I found out that my MLX90614 is inaccurate by 2degree celsisus.
When I change float objectT = therm.object(); // Get updated object temperature to float objectT = therm.object(); + 2 // Get updated object temperature, the oled display reads 35.5 degree celsius one second and 37.5 degree celsisus another second. Meaning to say it fluctuates between the +2 temperature and the actual recorded temperature of the MLX90614.
Below full code for reference:
/******************************************************************************
MLX90614_Serial_Demo.ino
Serial output example for the MLX90614 Infrared Thermometer
This example reads from the MLX90614 and prints out ambient and object
temperatures every half-second or so. Open the serial monitor and set the
baud rate to 9600.
Hardware Hookup (if you're not using the eval board):
MLX90614 ------------- Arduino
VDD ------------------ 3.3V
VSS ------------------ GND
SDA ------------------ SDA (A4 on older boards)
SCL ------------------ SCL (A5 on older boards)
An LED can be attached to pin 8 to monitor for any read errors.
Jim Lindblom @ SparkFun Electronics
October 23, 2015
https://github.com/sparkfun/SparkFun_MLX90614_Arduino_Library
Development environment specifics:
Arduino 1.6.5
SparkFun IR Thermometer Evaluation Board - MLX90614
******************************************************************************/
#include <Wire.h> // I2C library, required for MLX90614
#include <SparkFunMLX90614.h> // SparkFunMLX90614 Arduino library
#include <SFE_MicroOLED.h> // Include the SFE_MicroOLED library
//////////////////////////
// MicroOLED Definition //
//////////////////////////
//The library assumes a reset pin is necessary. The Qwiic OLED has RST hard-wired, so pick an arbitrarty IO pin that is not being used
#define PIN_RESET 9
//The DC_JUMPER is the I2C Address Select jumper. Set to 1 if the jumper is open (Default), or set to 0 if it's closed.
#define DC_JUMPER 0
MicroOLED oled(PIN_RESET, DC_JUMPER); // I2C declaration
IRTherm therm; // Create an IRTherm object to interact with throughout
const byte LED_PIN = 8; // Optional LED attached to pin 8 (active low)
//float newEmissivity = 1.00;
void setup()
{
//Serial.begin(9600);
//Setup Micro OLED first then setup MLX90614
//Setup Micro OLED
delay(100);
Wire.begin();
oled.begin(); // Initialize the OLED
oled.clear(ALL); // Clear the display's internal memory
oled.display(); // Display what's in the buffer (splashscreen)
delay(1000); // Delay 1000 ms
oled.clear(PAGE); // Clear the buffer.
randomSeed(analogRead(A0) + analogRead(A1));
//Setup MLX90614
//Serial.begin(9600); // Initialize Serial to log output
therm.begin(); // Initialize thermal IR sensor
therm.setUnit(TEMP_C); // Set the library's units to Farenheit
//therm.setEmissivity(newEmissivity);
// Alternatively, TEMP_F can be replaced with TEMP_C for Celsius or
// TEMP_K for Kelvin.
pinMode(LED_PIN, OUTPUT); // LED pin as output
setLED(LOW); // LED OFF
}
void loop()
{
setLED(HIGH); //LED on
// Call therm.read() to read object and ambient temperatures from the sensor.
if (therm.read()) // On success, read() will return 1, on fail 0.
{
// Use the object() and ambient() functions to grab the object and ambient
// temperatures.
// They'll be floats, calculated out to the unit you set with setUnit()
float objectT = therm.object(); // Get updated object temperature
oled.setFontType(2); // 7-segment display style characters, 10x16-pixels each
oled.setCursor(10,10); // Set the text cursor to the left of the screen.
oled.print(objectT);
oled.display();
//Serial.print("Object: " + String(therm.object()+ 2, 2));
//Serial.print("Object: " + String(therm.object()+ 2, 2));
//Serial.print("Object: " + String(therm.object(), 2));
//Serial.write('°'); // Degree Symbol
//Serial.println("C");
//Serial.print("Ambient: " + String(therm.ambient(), 2));
//Serial.write('°'); // Degree Symbol
//Serial.println("C");
//Serial.println();
}
setLED(LOW);
delay(500);
}
void setLED(bool on)
{
if (on)
digitalWrite(LED_PIN, LOW);
else
digitalWrite(LED_PIN, HIGH);
}
Importantly, i managed to hookup the micro oled and mlx90614, problem is after I upload the code using ftdi basic and remove it, then connect a battery to it and switch on, it shows dots, upon pressing rst button on MLX90614, then it displays the temperature. Anyone know how to solve this issue?
I have connected my MLX90614 and Micro OLED breakout display in i2c mode, both sparkfun products and battery powered, when I power my circuit with 3 1.2v batteries the display lights up (shows many little dots) instead of the temperature recorded by the MLX90614, so I press the reset button on the MLX90614 Evaluation Board and the display resets and displays the temperature. When I remove the battery and plug it back in, the dots show again and I must press reset button every single time.
The connection of the MLX90614 and oled is:
MLX90614 to OLED
RST to RST
SDA to SDA
SCL to SCL
the code is:
/******************************************************************************
MLX90614_Serial_Demo.ino
Serial output example for the MLX90614 Infrared Thermometer
This example reads from the MLX90614 and prints out ambient and object
temperatures every half-second or so. Open the serial monitor and set the
baud rate to 9600.
Hardware Hookup (if you're not using the eval board):
MLX90614 ------------- Arduino
VDD ------------------ 3.3V
VSS ------------------ GND
SDA ------------------ SDA (A4 on older boards)
SCL ------------------ SCL (A5 oacn older boards)
An LED can be attached to pin 8 to monitor for any read errors.
Jim Lindblom @ SparkFun Electronics
October 23, 2015
https://github.com/sparkfun/SparkFun_MLX90614_Arduino_Library
Development environment specifics:
Arduino 1.6.5
SparkFun IR Thermometer Evaluation Board - MLX90614
******************************************************************************/
#include <Wire.h> // I2C library, required for MLX90614
#include <SparkFunMLX90614.h> // SparkFunMLX90614 Arduino library
#include <SFE_MicroOLED.h> // Include the SFE_MicroOLED library
//////////////////////////
// MicroOLED Definition //
//////////////////////////
//The library assumes a reset pin is necessary. The Qwiic OLED has RST hard-wired, so pick an arbitrarty IO pin that is not being used
#define PIN_RESET 9
//The DC_JUMPER is the I2C Address Select jumper. Set to 1 if the jumper is open (Default), or set to 0 if it's closed.
#define DC_JUMPER 1
MicroOLED oled(PIN_RESET, DC_JUMPER); // I2C declaration
IRTherm therm; // Create an IRTherm object to interact with throughout
const byte LED_PIN = 8; // Optional LED attached to pin 8 (active low)
//float newEmissivity = 1.00;
void setup()
{
//Serial.begin(9600);
//Setup Micro OLED first then setup MLX90614
//Setup Micro OLED
delay(100);
Wire.begin();
oled.begin(); // Initialize the OLED
oled.clear(ALL); // Clear the display's internal memory
oled.display(); // Display what's in the buffer (splashscreen)
delay(1000); // Delay 1000 ms
oled.clear(PAGE); // Clear the buffer.
randomSeed(analogRead(A0) + analogRead(A1));
//Setup MLX90614
//Serial.begin(9600); // Initialize Serial to log output
therm.begin(); // Initialize thermal IR sensor
therm.setUnit(TEMP_C); // Set the library's units to Farenheit
//therm.setEmissivity(newEmissivity);
// Alternatively, TEMP_F can be replaced with TEMP_C for Celsius or
// TEMP_K for Kelvin.
pinMode(LED_PIN, OUTPUT); // LED pin as output
setLED(LOW); // LED OFF
}
void loop()
{
setLED(HIGH); //LED on
// Call therm.read() to read object and ambient temperatures from the sensor.
if (therm.read()) // On success, read() will return 1, on fail 0.
{
// Use the object() and ambient() functions to grab the object and ambient
// temperatures.
// They'll be floats, calculated out to the unit you set with setUnit()
float objectT = therm.object() + 2 ; // Get updated object temperature
oled.setFontType(2); // 7-segment display style characters, 10x16-pixels each
oled.setCursor(10,10); // Set the text cursor to the left of the screen.
oled.print(objectT);
oled.display();
//Serial.print("Object: " + String(therm.object()+ 2, 2));
//Serial.print("Object: " + String(therm.object()+ 2, 2));
//Serial.print("Object: " + String(therm.object(), 2));
//Serial.write('°'); // Degree Symbol
//Serial.println("C");
//Serial.print("Ambient: " + String(therm.ambient(), 2));
//Serial.write('°'); // Degree Symbol
//Serial.println("C");
//Serial.println();
}
setLED(LOW);
delay(2000);
}
void setLED(bool on)
{
if (on)
digitalWrite(LED_PIN, LOW);
else
digitalWrite(LED_PIN, HIGH);
}
First of all, I’m not sure I’m reacting to the most recent posts about the MLX90614 sensor. Apologies it that’s true. I and many other users (just check online) have had problems interfacing the MLX90614 with other I2C devices, specifically including the many small OLED displays that are widely available online. My own experience is that the MLX90614 will work with an LCD/I2C display but not with an IZOKEE 0.96" OLED. There is no apparent reason why this should be true. The problem APPEARS to have something to do with some non-standard details of how the MLX90614 I2C interface is designed. What users typically report is that the OLED will display a value of 1037.55 – yes, this specific value – for both the object and ambient temperatures obtained using the installed software library. On my setup, reasonable values appear briefly (for about 1 second) when the system is powered up and then the 1037.55 value thereafter. And yes, I have included pullup resistors on the SCL/SDA lines as required.
I think one of the SparkFun posts said basically that it wasn’t their problem to figure out how to use this device with displays. But, figuring out problems with using small OLEDs rather than large and relatively power-hungry LCDs to display outputs from this very nice sensor SHOULD be of concern to Sparkfun. Why does it work with at least some LCD/I2C displays and not with at least some small OLEDs?? This is not a question with an obvious answer – the I2C protocol is SUPPOSED to be standardized to make possible communications with many different devices as long as they have discrete hardware addresses – but is of obvious concern for many users (again, just look online).
SparkFun manufactures the evaluation board the MLX90614 sits on, we don’t have anything to do with the actual sensor itself. The evaluation board is meant to demonstrate the MLX90614 inside a serial terminal so that people can easily try out the sensor to see how it performs in their application. While we do break out some pins for you to use for other devices, we can’t support connecting other devices to the evaluation board because of the huge number of combinations possible. It’s up to the user to figure these things out using data sheets and other information available from the manufacturer of the devices you would like to combine.
While I2C is supposed to be standardized a lot of sensor manufacturers don’t follow the standard and that sometimes creates problems for other devices on the bus. SparkFun has run into issues with I2C parts that don’t play by the rules before. The lightning sensor for example uses the I2C bus in a non standard way that’s not compatible with the Arduino Wire library.
With the right programming tricks and libraries you should be able to get just about any I2C part to work with another as long as they have unique addresses. Sadly SparkFun doesn’t have the resources to test every possible combination of parts so we give customers enough to try things out. In many cases our libraries and example code are everything you need but sometimes you run into wall where you need to get creative with code. Unfortunately this is just a part of electronics and what makes this hobby challenging yet rewarding.
A somewhat disappointing reply… Let me just ask if you have put together a system that works with the MLX90614 sensor an ANY small OLED available from SparkFun? I suppose one could use the SPI interface on your micro OLED, but it’s not particularly cheap and requires level shifting for 5V Arduinos, plus it’s got a relatively small pixel count relative to other widely available small OLEDs. (Adafruit boards typically include built-in level shifting if needed.)
Let me just ask if you have put together a system that works with the MLX90614 sensor an ANY small OLED available from SparkFun?
I have not. A former SparkFun employee built this, but since it was only meant to demonstrate what you could build and was never documented. No code or hookup diagrams exist for that project.
SPI needs 4 wires rather than 2, cost to use SPI over I2C should be negligible. If you use a board with 3.3 volt I/O no logic level converter is needed but even if you do need logic level conversion, it’s less than [$3.00.](https://www.sparkfun.com/products/12009)
OK. Fair enough. But widely available inexpensive OLEDs support only I2C – not SPI. The interesting questions still remain: Why does the MLX90614 not get along with some other I2C devices? (It’s the first device I’ve ever tried to use that has such a problem) and is there any way around the problem? I concede that this is not necessarily your problem, but with a little intellectual curiosity and the skills to delve into such questions, you would be performing a significant service.