Giter Site home page Giter Site logo

makerportal / raspi-thermal-cam Goto Github PK

View Code? Open in Web Editor NEW
30.0 30.0 3.0 31 KB

Raspberry Pi Thermal Camera in Real Time with MLX90640 and Python

License: GNU General Public License v3.0

Python 100.00%
camera infrared infrared-sensors ir monitoring pixels python raspberry-pi raspberry-pi-3 temperature temperature-map thermal thermal-camera tutorial

raspi-thermal-cam's People

Contributors

josh-hrisko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

raspi-thermal-cam's Issues

Could not obtain 0x33 address

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: -- -- -- -- -- -- -- --

OSError: [Errno 5] Input/output error

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
"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.