Working node for mlx90614

How can Implement the DFRobot mlx90614 with my project in xod?
I was using Wayland mlx90614 node library but when compiling and uploading I get errors:

Begin compiling code for the board Arduino Uno :package:

C:\Users\nico\AppData\Local\Temp\xod_temp_sketchbookjA84sS\xod_1714224135410_sketch\xod_1714224135410_sketch.ino: In member function ‘void xod::wayland__mlx90614__mlx90614::Node::evaluate(xod::wayland__mlx90614__mlx90614::Node::Context)’:
C:\Users\nico\AppData\Local\Temp\xod_temp_sketchbookjA84sS\xod_1714224135410_sketch\xod_1714224135410_sketch.ino:1675:61: error: no matching function for call to ‘Adafruit_MLX90614::Adafruit_MLX90614(unsigned char&)’
Type sensor = new (mem) Adafruit_MLX90614(address);
^
In file included from C:\Users\nico\AppData\Local\Temp\xod_temp_sketchbookjA84sS\xod_1714224135410_sketch\xod_1714224135410_sketch.ino:1498:0:
C:\Users\nico\AppData\Local\Temp\xod_temp_sketchbookjA84sS\libraries\Adafruit_MLX90614_Library/Adafruit_MLX90614.h:46:7: note: candidate: Adafruit_MLX90614::Adafruit_MLX90614()
class Adafruit_MLX90614 {
^~~~~~~~~~~~~~~~~
C:\Users\nico\AppData\Local\Temp\xod_temp_sketchbookjA84sS\libraries\Adafruit_MLX90614_Library/Adafruit_MLX90614.h:46:7: note: candidate expects 0 arguments, 1 provided
C:\Users\nico\AppData\Local\Temp\xod_temp_sketchbookjA84sS\libraries\Adafruit_MLX90614_Library/Adafruit_MLX90614.h:46:7: note: candidate: constexpr Adafruit_MLX90614::Adafruit_MLX90614(const Adafruit_MLX90614&)
C:\Users\nico\AppData\Local\Temp\xod_temp_sketchbookjA84sS\libraries\Adafruit_MLX90614_Library/Adafruit_MLX90614.h:46:7: note: no known conversion for argument 1 from ‘unsigned char’ to ‘const Adafruit_MLX90614&’

Error during build: exit status 1

Hi @nico-ricoh,

It appears that my XOD library was broken by changes to the underlying Arduino library. I’ve now fixed my XOD library - please install the new version and let me know how you get on. I don’t have one of the sensors, so I haven’t been able to test my library. However, the example patch does now compile!

Thank you for the feedback. We still getting the following errors when compiling.

Begin compiling code for the board Arduino Uno :package:

C:\Users\nico\AppData\Local\Temp\ccAmLedg.ltrans0.ltrans.o: In function read16': C:\Users\nico\AppData\Local\Temp\xod_temp_sketchbookulrYa2\libraries\Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp:134: undefined reference to Adafruit_I2CDevice::write_then_read(unsigned char const*, unsigned int, unsigned char*, unsigned int, bool)’
C:\Users\nico\AppData\Local\Temp\ccAmLedg.ltrans0.ltrans.o: In function begin': C:\Users\nico\AppData\Local\Temp\xod_temp_sketchbookulrYa2\libraries\Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp:36: undefined reference to Adafruit_I2CDevice::Adafruit_I2CDevice(unsigned char, TwoWire*)’
C:\Users\nico\AppData\Local\Temp\xod_temp_sketchbookulrYa2\libraries\Adafruit_MLX90614_Library/Adafruit_MLX90614.cpp:37
: undefined reference to `Adafruit_I2CDevice::begin(bool)

collect2.exe: error: ld returned 1 exit status

Error during build: exit status 1

OK, so the Arduino library for the MLX90614 requires the Adafruit BusIO library. I already had the BusIO installed, so compilation worked for me. I’ve now modified my XOD library so that it will automatically install the BusIO library.

Please try downloading the new version (0.0.3).

Thank you for the update, we will give you feedback.

Hello

Thank you it is working perfectly now.

Nico Gerbe