I have your mlx90614 and have downloaded your library and example. This works perfectly fine on an Arduino UNO but does not work on the Arduino WiFi Rev 2.
I run a utility to determine the address and it finds it with no problems. However it does not work, giving a fixed vale like 1073 or something like that. If I remove the SDA and SLC connections it behaves exactly the same, thus the library is not reading the values.
It’s very possible the library just doesn’t function correctly on the Uno WiFi V2. That board uses a different processor than the regular Uno and the library was written at a time before the WiFi V2 existed.
The whole Arduino landscape is a mess. Everytime I try a newer modern board I run into all kinds of problems like this. It’s fine if. You want to live in the past but there is just no future migration paths. You would think that an ic2 library would be kept current with all the hardware. What a piece of junk the Arduino is
The solution is very simple: don’t use the MLX library.
The I2C calls work, or you would not detect the device address correctly. So, use the Wire library calls with your WiFi board to get out the register contents of interest, and be on your way. The MLX90614 data sheet has all the information you need to measure temperatures.
Yeah, I agree. There are a huge number of boards coming out and all of them have their own quirks. Couple that with libraries that were written long ago when the ATmega328 was the only uC in use and a lot of those libraries assume they are running on that uC so they are written specifically for that or to use features in the 328 that might not be found on other boards.
It is frustrating and causes a lot of incompatibilities but it appears that this is the price of progress.
Kind of like trying to use your 5 year old printer on Windows 10. The printer works fine, but you can’t find 64 bit drivers anywhere.
The Wire library: Why should I need to use this to program? I mean, the registers will be the same on the MLX given that the address is the same, no?. However, I know nothing about the Wire library.
So given that the MLX library must use the wire library why would it not work unless the wire library itself is faulty.
The Wire library is what makes I2C communication work and since the MLX90614 is an I2C device, you need the Wire library to talk to it.
As far as the other software incompatibilities, it’s like trying to play a Playstation game on an Xbox. The code in a Playstation game is not written to run on the hardware in a Xbox so it won’t work. Since the Uno WiFi R2 has a different processor than a Uno, the code may not work. In this case, something isn’t compatible and that’s what’s causing your trouble.
A solution would be to use an Uno to run the MLX90614 and then pass data from the Uno over to the Uno WiFi V2 via serial. Or, you could re-write the library for the MLX90614 so it works with the Uno WiFi V2, but using an Uno would be a lot easier if you don’t know how to program.
You don’t have to use the Wire library, which is the Arduino default framework for I2C communication, but you DO have to use I2C communication.
I2C works on the Uno Wifi V2. There are other I2C libraries; you can access the I2C hardware directly, or use “bit bang” software I2C. But there is no reason to do so, so learn to use the Wire library.
If you don’t have these basics down, you are getting way ahead of yourself.
I2C obviously does not work on the uni WiFi 3. I have tried many of these. What I am hearing is that issue is with the underlying wire library.
This make no sense. Why should a user modify the wire library? Or the I2C library?
So here is a an example. I am a windows programmer. Never in the 8 years I have been producing coercial software for controlling radio and dsp devices have I ever had to modify .NET or the bios of the computer. The I2C library should work,. Any applications built against it should work on any platform as long as the Arduino owners produce a proper framework.
This is just nuts.it would be simple for them to produce an eco system that works no matter whAt board they come out with.
So where do I start fixing this? The sparkfun library references wire and I2C. Where’s the fault?
Along the same lines I have another sketch that also doesn’t work, but it reports unknown hardware. Why should it reports that? Do you not set the device in the IDE? I did.
I spoke too soon. Having problems with the shield not displaying the blue light most of the time and getting very high heat from some parts on the Arduino when this happens.
I wrote this up in another thread on your products.