Skip to content

Frame class 'NoneType' #10

@EmmanuelLC

Description

@EmmanuelLC

Hello,

I am trying to get a frame from the EVB90640. It seems that the connection with the device is working (can get the port and id: b'\x01\xe9\x03 \x00\x01Melexis\x01EVB90640\x01V 2.0\x01D87 256EAFC \x01’). However, when using the read_frame function, no frame is returned.

You’ll find my code below. Thanks in advance for your help.

import mlx.mlx90640 as mlx
import cv2
import numpy as np
import serial.tools.list_ports
ports = serial.tools.list_ports.comports()

for port, desc, hwid in sorted(ports):
print("{}: {} [{}]".format(port, desc, hwid))
print(port)
print('------------------------------------------------------------------------------------')

dev = mlx.Mlx9064x('/dev/tty.usbmodem21101', i2c_addr=0x33, frame_rate=8.0) # establish communication between EVB90640 and
# PC, the I2C address of the MLX90640 sensor is
# 0x33 and change the frame rate to 8Hz
print(type(dev))

dev.init() # read EEPROM and pre-compute calibration parameters.
print(dev.get_hardware_id())

try:
frame = dev.read_frame()
print('frame_rate : ', dev.frame_rate)
print(type(frame))
print(np.size(frame))
print(np.shape(frame))
print(frame)
except:
dev.clear_error(dev.frame_rate)
print("error")
else:
if frame is not None:
print('Got a frame')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions