I am so worried, I already tried this. Please help me regarding to run Mlx90640 on jetson nano 2GB.
I used following github library
I am sending my commands and executions to you. Please have a look and help me to run.
These are the errors occuring again and again.
waseemsofficial@Waseems-AI:~$ sudo chmod 666 /sys/bus/i2c/devices/i2c-1/bus_clk_rate
[sudo] password for waseemsofficial:
waseemsofficial@Waseems-AI:~$ echo 400000 > /sys/bus/i2c/devices/i2c-1/bus_clk_rate
waseemsofficial@Waseems-AI:~$ sudo i2cdetect -y -r 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – – – – – – – – – – – – –
10: – – – – – – – – – – – – – – – –
20: – – – – – – – – – – – – – – – –
30: – – – 33 – – – – – – – – – – – –
40: – – – – – – – – – – – – – – – –
50: – – – – – – – – – – – – – – – –
60: – – – – – – – – – – – – – – – –
70: – – – – – – – –
waseemsofficial@Waseems-AI:~$ ls
1_mlx90640.py mlx90640-driver-py
Adafruit_CircuitPython_MLX90640 mlx90640-library
Adafruit_MLX90640 Music
CSI-Camera Pictures
Desktop Public
Documents seeed_ircamera
Downloads Templates
examples.desktop ThermalFaceDetection
mlx90640-driver-devicetree-py Videos
waseemsofficial@Waseems-AI:~$ cd ThermalFaceDetection
waseemsofficial@Waseems-AI:~/ThermalFaceDetection$ ls
1_mlx90640.py deploy.prototxt.txt
2_cam_overlay_mlx.py photos
3_thermalFaceDetection_1.py README.md
4_thermalFaceDetection_2.py res10_300x300_ssd_iter_140000.caffemodel
5_thermalFaceDetection_3.py
waseemsofficial@Waseems-AI:~/ThermalFaceDetection$ python3 1_mlx90640.py
Traceback (most recent call last):
File “1_mlx90640.py”, line 27, in
mlx.getFrame(tframe) # read MLX temperatures into frame var
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_mlx90640.py”, line 131, in getFrame
self._CalculateTo(mlx90640Frame, emissivity, tr, framebuf)
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_mlx90640.py”, line 334, in _CalculateTo
+ taTr
ValueError: math domain error
Exiting…
Cleaning up pins
waseemsofficial@Waseems-AI:~/ThermalFaceDetection$ ^C
waseemsofficial@Waseems-AI:~/ThermalFaceDetection$ python3 1_mlx90640.py
Traceback (most recent call last):
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_bus_device/i2c_device.py”, line 154, in __probe_for_device
self.i2c.writeto(self.device_address, b"")
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/busio.py”, line 159, in writeto
return self._i2c.writeto(address, buffer, stop=stop)
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py”, line 49, in writeto
self._i2c_bus.write_bytes(address, buffer[start:end])
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/Adafruit_PureIO/smbus.py”, line 314, 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 “1_mlx90640.py”, line 11, in
mlx = adafruit_mlx90640.MLX90640(i2c) # begin MLX90640 with I2C comm
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_mlx90640.py”, line 88, in init
self.i2c_device = I2CDevice(i2c_bus, address)
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_bus_device/i2c_device.py”, line 50, in init
self.__probe_for_device()
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_bus_device/i2c_device.py”, line 160, in __probe_for_device
self.i2c.readfrom_into(self.device_address, result)
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/busio.py”, line 149, in readfrom_into
return self._i2c.readfrom_into(address, buffer, stop=stop)
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py”, line 58, in readfrom_into
buffer[i + start] = readin[i]
TypeError: ‘NoneType’ object is not subscriptable
Exiting…
Cleaning up pins
waseemsofficial@Waseems-AI:~/ThermalFaceDetection$ python3 1_mlx90640.py
Traceback (most recent call last):
File “1_mlx90640.py”, line 27, in
mlx.getFrame(tframe) # read MLX temperatures into frame var
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_mlx90640.py”, line 126, in getFrame
status = self._GetFrameData(mlx90640Frame)
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_mlx90640.py”, line 140, in _GetFrameData
self._I2CReadWords(0x8000, statusRegister)
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_mlx90640.py”, line 829, in _I2CReadWords
addrbuf, inbuf, in_end=read_words * 2
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_bus_device/i2c_device.py”, line 131, in write_then_readinto
in_end=in_end,
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/busio.py”, line 184, in writeto_then_readfrom
stop=stop,
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py”, line 88, in writeto_then_readfrom
address, buffer_out[out_start:out_end], in_end - in_start
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/Adafruit_PureIO/smbus.py”, line 275, in read_i2c_block_data
ioctl(self._device.fileno(), I2C_RDWR, request)
BlockingIOError: [Errno 11] Resource temporarily unavailable (This is the only error which occur most of the time)
Exiting…
Cleaning up pins
waseemsofficial@Waseems-AI:~/ThermalFaceDetection$ python3 1_mlx90640.py
Traceback (most recent call last):
File “1_mlx90640.py”, line 11, in
mlx = adafruit_mlx90640.MLX90640(i2c) # begin MLX90640 with I2C comm
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_mlx90640.py”, line 89, in init
self._I2CReadWords(0x2400, eeData)
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_mlx90640.py”, line 829, in _I2CReadWords
addrbuf, inbuf, in_end=read_words * 2
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_bus_device/i2c_device.py”, line 131, in write_then_readinto
in_end=in_end,
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/busio.py”, line 184, in writeto_then_readfrom
stop=stop,
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py”, line 88, in writeto_then_readfrom
address, buffer_out[out_start:out_end], in_end - in_start
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/Adafruit_PureIO/smbus.py”, line 275, in read_i2c_block_data
ioctl(self._device.fileno(), I2C_RDWR, request)
OSError: [Errno 5] Input/output error
Exiting…
Cleaning up pins
waseemsofficial@Waseems-AI:~/ThermalFaceDetection$ python3 1_mlx90640.py
Traceback (most recent call last):
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_bus_device/i2c_device.py”, line 154, in __probe_for_device
self.i2c.writeto(self.device_address, b"")
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/busio.py”, line 159, in writeto
return self._i2c.writeto(address, buffer, stop=stop)
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py”, line 49, in writeto
self._i2c_bus.write_bytes(address, buffer[start:end])
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/Adafruit_PureIO/smbus.py”, line 314, 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 “1_mlx90640.py”, line 11, in
mlx = adafruit_mlx90640.MLX90640(i2c) # begin MLX90640 with I2C comm
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_mlx90640.py”, line 88, in init
self.i2c_device = I2CDevice(i2c_bus, address)
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_bus_device/i2c_device.py”, line 50, in init
self.__probe_for_device()
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_bus_device/i2c_device.py”, line 160, in __probe_for_device
self.i2c.readfrom_into(self.device_address, result)
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/busio.py”, line 149, in readfrom_into
return self._i2c.readfrom_into(address, buffer, stop=stop)
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py”, line 58, in readfrom_into
buffer[i + start] = readin[i]
TypeError: ‘NoneType’ object is not subscriptable
Exiting…
Cleaning up pins
waseemsofficial@Waseems-AI:~/ThermalFaceDetection$ python3 1_mlx90640.py
Traceback (most recent call last):
File “1_mlx90640.py”, line 27, in
mlx.getFrame(tframe) # read MLX temperatures into frame var
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_mlx90640.py”, line 126, in getFrame
status = self._GetFrameData(mlx90640Frame)
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_mlx90640.py”, line 147, in _GetFrameData
self._I2CReadWords(0x0400, frameData, end=832)
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_mlx90640.py”, line 829, in _I2CReadWords
addrbuf, inbuf, in_end=read_words * 2
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_bus_device/i2c_device.py”, line 131, in write_then_readinto
in_end=in_end,
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/busio.py”, line 184, in writeto_then_readfrom
stop=stop,
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py”, line 88, in writeto_then_readfrom
address, buffer_out[out_start:out_end], in_end - in_start
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/Adafruit_PureIO/smbus.py”, line 275, in read_i2c_block_data
ioctl(self._device.fileno(), I2C_RDWR, request)
BlockingIOError: [Errno 11] Resource temporarily unavailable
Exiting…
Cleaning up pins
waseemsofficial@Waseems-AI:~/ThermalFaceDetection$ python3 1_mlx90640.py
Traceback (most recent call last):
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_bus_device/i2c_device.py”, line 154, in __probe_for_device
self.i2c.writeto(self.device_address, b"")
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/busio.py”, line 159, in writeto
return self._i2c.writeto(address, buffer, stop=stop)
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py”, line 49, in writeto
self._i2c_bus.write_bytes(address, buffer[start:end])
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/Adafruit_PureIO/smbus.py”, line 314, 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 “1_mlx90640.py”, line 11, in
mlx = adafruit_mlx90640.MLX90640(i2c) # begin MLX90640 with I2C comm
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_mlx90640.py”, line 88, in init
self.i2c_device = I2CDevice(i2c_bus, address)
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_bus_device/i2c_device.py”, line 50, in init
self.__probe_for_device()
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_bus_device/i2c_device.py”, line 160, in __probe_for_device
self.i2c.readfrom_into(self.device_address, result)
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/busio.py”, line 149, in readfrom_into
return self._i2c.readfrom_into(address, buffer, stop=stop)
File “/home/waseemsofficial/.local/lib/python3.6/site-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py”, line 58, in readfrom_into
buffer[i + start] = readin[i]
TypeError: ‘NoneType’ object is not subscriptable
Exiting…
Cleaning up pins
By running again and again the same command python3 1_mlx90640.py it shows different errors again and again.