-
Notifications
You must be signed in to change notification settings - Fork 14
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
Errno 5 by useing mlx90614.py #8
Comments
I think that you have a wrong declaration of i2c. Try this: i2c = I2C(id=0, sda = Pin(4), scl = Pin(5), freq=100000) |
Here you can find out working example of mine: https://github.com/jmodrako/astroclouds/blob/main/app/main.py |
Hey, @jmodrako, this library was originally written to work with the ESP8266 port and its software I2C. According to the docs, these are the latest I2C init patterns for ESP32.
I'll update the example code Also, the datasheet mentions a requirement about the I2C frequency needing to be 100k or less |
Sadly none of these examples where working. I am using an raspberry pi pico w and not an ESP32. I alwasy get Errno5 or some other errors not even the "working example" of @jmodrako where working with my pico. I dont know what i am doing wrong. ^^ |
I have found my Problem ... I was not using the ADCs. After i switched that all was working just fine. Code: i2c = SoftI2C(scl=Pin(27), sda=Pin(26), freq=100000) while True: Thanks for your fast response! |
Hey, I tryed to use my mlx90614 but i had some issues by using it. Maybe someone can help?
So i tryed this code from you:
import mlx90614
from machine import I2C, Pin
i2c = I2C(scl=Pin(5), sda=Pin(4))
sensor = mlx90614.MLX90614(i2c)
print(sensor.read_ambient_temp())
print(sensor.read_object_temp())
if sensor.dual_zone:
print(sensor.object2_temp)
but i got this Output:
Traceback (most recent call last):
File "", line 4, in
TypeError: 'id' argument required
So i added an id = 0 and then i got:
Traceback (most recent call last):
File "", line 5, in
File "mlx90614.py", line 76, in init
OSError: [Errno 5] EIO
And i was not able to fix this until now. I would be thankful if someone would help me :)
The text was updated successfully, but these errors were encountered: