Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example SoftWire_MLX90614 not working #36

Open
Juhuich opened this issue Mar 13, 2024 · 0 comments
Open

example SoftWire_MLX90614 not working #36

Juhuich opened this issue Mar 13, 2024 · 0 comments

Comments

@Juhuich
Copy link

Juhuich commented Mar 13, 2024

Hi Steve,
I'm using a MLX90614 connected to ESP32-C3 super micro board with Arduino-IDE 2.3.2. So I tried your example "SoftWire_MLX90614", but no success. I found following problems in your example :

  1. there is no pause after Serial.begin() and so the following Serial.println("MLX90614_demo") is not done. (small problem ;-))
  2. at the function "readMLX90614(uint8_t command, uint8_t &crc)" you use "i2c.write(command);". But that does't send the command-byte on I2C-bus. I replaced it with "i2c.llWrite(command);" That works.
  3. in loop() the "readMLX90614()" is called twice to get Ambient- and Object-temperature. That leads to hang-up of the program. If I insert a little pause (for ex. : delay(1)) between the two "readMLX90614()", the program runs and both values are read fine.

While I had the problems above, I saw that you created a library for the MLX90614. So I installed it and tried example MLX90614_demo. But I got compilation error :
".....src\ MLX90614.cpp: In member function 'bool MLX90614::read(uint8_t, uint16_t&) const':
d:\Program Files (x86)\Arduino\neue_Libraries\libraries\MLX90614\src\MLX90614.cpp:154:24: error: passing 'const SoftWire' as 'this' argument discards qualifiers [-fpermissive]
i2c.write(command) || // Command sent"
I didn't check further for that because I'm using SoftWire with the problem solutions above.

I hope my comments can help others with the same problems.
Thank you Steve for SoftWire, it runs really fine in my project now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant