0

Mlx90614 error
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Mlx90614 error

by brian_02 on Thu Jun 13, 2019 12:42 pm

estoy presentando este error al ejecutar el codigo


Traceback (most recent call last):
File "/home/prueba/.local/lib/python3.6/site-packages/adafruit_bus_device/i2c_device.py", line 68, in __init__
i2c.writeto(device_address, b'')
File "/home/prueba/.local/lib/python3.6/site-packages/busio.py", line 65, in writeto
return self._i2c.writeto(address, buffer, stop=stop)
File "/home/prueba/.local/lib/python3.6/site-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py", line 38, in writeto
self._i2c_bus.write_bytes(address, buffer[start:end])
File "/home/prueba/.local/lib/python3.6/site-packages/Adafruit_PureIO/smbus.py", line 244, in write_bytes
self._device.write(buf)
TimeoutError: [Errno 110] Connection timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "lol.py", line 6, in <module>
mlx = adafruit_mlx90614.MLX90614(i2c)
File "/home/prueba/.local/lib/python3.6/site-packages/adafruit_mlx90614.py", line 101, in __init__
self._device = i2c_device.I2CDevice(i2c_bus, address)
File "/home/prueba/.local/lib/python3.6/site-packages/adafruit_bus_device/i2c_device.py", line 74, in __init__
i2c.readfrom_into(device_address, result)
File "/home/prueba/.local/lib/python3.6/site-packages/busio.py", line 55, in readfrom_into
return self._i2c.readfrom_into(address, buffer, stop=stop)
File "/home/prueba/.local/lib/python3.6/site-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py", line 46, in readfrom_into
buffer[i+start] = readin[i]
TypeError: 'NoneType' object is not subscriptable

brian_02
 
Posts: 7
Joined: Thu Jun 13, 2019 12:41 pm

Re: Mlx90614 error

by adafruit_support_carter on Thu Jun 13, 2019 12:48 pm

Looks like you're running this on a Pi. Post a photo of your setup showing how everything is connected.

adafruit_support_carter
 
Posts: 12587
Joined: Tue Nov 29, 2016 2:45 pm

Re: Mlx90614 error

by brian_02 on Fri Jun 14, 2019 10:49 am

hello, and thanks to respond, is not a pi is a jetson nano (in terms of programming are the same), and I already solve this problem. the question now is how to change the address that comes from default (0x5a) to connect multiple dipositivos in seen tutorials but they are all arduino

brian_02
 
Posts: 7
Joined: Thu Jun 13, 2019 12:41 pm

Re: Mlx90614 error

by adafruit_support_carter on Fri Jun 14, 2019 12:24 pm

Pass in the non-default address when creating the sensor object:
https://github.com/adafruit/Adafruit_Ci ... 14.py#L100
ex:
Code: Select all | TOGGLE FULL SIZE
mlx = adafruit_mlx90614.MLX90614(i2c, address=0x5b)


To actually change it for the device, you'll have to write the address into the EEPROM. See datasheet:
http://www.adafruit.com/datasheets/MLX90614.pdf

adafruit_support_carter
 
Posts: 12587
Joined: Tue Nov 29, 2016 2:45 pm

Re: Mlx90614 error

by brian_02 on Fri Jun 14, 2019 12:58 pm

yes, but the data sheet does not say how to change the address

brian_02
 
Posts: 7
Joined: Thu Jun 13, 2019 12:41 pm

Re: Mlx90614 error

by adafruit_support_carter on Fri Jun 14, 2019 1:09 pm

See s8.4.5 for details about accessing EEPROM. See s8.3.3 for details about EEPROM layout. The slave address is stored at 0x0E in EEPROM.

It doesn't look like the driver has a feature to do this for you, so you'll have to work it out via the datasheet. You could also try creating an issue in the library repo to request this be added.
https://github.com/adafruit/Adafruit_Ci ... 614/issues

adafruit_support_carter
 
Posts: 12587
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.