makerportal / raspi-thermal-cam Goto Github PK
View Code? Open in Web Editor NEWRaspberry Pi Thermal Camera in Real Time with MLX90640 and Python
License: GNU General Public License v3.0
Raspberry Pi Thermal Camera in Real Time with MLX90640 and Python
License: GNU General Public License v3.0
After installed all the necessary modules and followed correctly the setup step, I only managed to obtain the addresses as below. I could not obtain 0x33 address. Does anyone know how to encounter this issue or having the same issue?
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: 50 51 52 53 54 55 56 57 -- -- -- -- -- -- -- --
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
Hi. I download the code and try mlx90640_test.py by modify it for keeping running on my raspberry pi 4 64bit
When it run 818 sec after start ,I got the error 'OSError: [Errno 5] Input/output error '
Do you know how can I fix it?
here is my code:
##################################
# MLX90640 Test with Raspberry Pi
##################################
#
import time,board,busio,os
import numpy as np
import adafruit_mlx90640
t0 =time.time()
i2c = busio.I2C(board.SCL, board.SDA, frequency=400000) # setup I2C
mlx = adafruit_mlx90640.MLX90640(i2c) # begin MLX90640 with I2C comm
mlx.refresh_rate = adafruit_mlx90640.RefreshRate.REFRESH_2_HZ # set refresh rate
frame = np.zeros((24*32,)) # setup array for storing all 768 temperatures
while True:
try:
mlx.getFrame(frame) # read MLX temperatures into frame var
except ValueError:
continue # if error, just read again
processtime = time.time()-t0
os.system('clear')
print('Average MLX90640 Temperature: {0:2.1f}C ({1:2.1f}F)'.\
format(np.mean(frame),(((9.0/5.0)*np.mean(frame))+32.0)))
print('processtime: %d sec'%processtime)
and here is the error report
"
Traceback (most recent call last):
File "/home/pi/raspi-thermal-cam/mlx90640_test.py", line 17, in
mlx.getFrame(frame) # read MLX temperatures into frame var
File "/usr/local/lib/python3.9/dist-packages/adafruit_mlx90640.py", line 126, in getFrame
status = self._GetFrameData(mlx90640Frame)
File "/usr/local/lib/python3.9/dist-packages/adafruit_mlx90640.py", line 140, in _GetFrameData
self._I2CReadWords(0x8000, statusRegister)
File "/usr/local/lib/python3.9/dist-packages/adafruit_mlx90640.py", line 828, in _I2CReadWords
i2c.write_then_readinto(
File "/usr/local/lib/python3.9/dist-packages/adafruit_bus_device/i2c_device.py", line 141, in write_then_readinto
self.i2c.writeto_then_readfrom(
File "/usr/local/lib/python3.9/dist-packages/busio.py", line 192, in writeto_then_readfrom
return self._i2c.writeto_then_readfrom(
File "/usr/local/lib/python3.9/dist-packages/adafruit_blinka/microcontroller/generic_linux/i2c.py", line 90, in writeto_then_readfrom
readin = self._i2c_bus.read_i2c_block_data(
File "/usr/local/lib/python3.9/dist-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
"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.