Skip to main content

MLX90640 driver for MCP2221 USB I2C hub

GitHub release (latest by date) Lines of code

PyPI PyPI - Python Version PyPI - License

platform

MLX90640 is a thermal camera (32x24 pixels) using Far InfraRed radiation from objects to measure the object temperature.
https://www.melexis.com/mlx90640
The python package "mlx90640-driver" driver interfaces the MLX90640 and aims to facilitate rapid prototyping.

This package provide the I2C low level routines. It uses the I2C hub from MCP2221 chip which is connected via the USB cable to the computer.
https://www.microchip.com/wwwproducts/en/mcp2221
https://www.adafruit.com/product/4471

Getting started

Installation

pip install mlx90640-driver-mcp2221

https://pypi.org/project/mlx90640-driver-mcp2221
https://pypistats.org/packages/mlx90640-driver-mcp2221

Extra installation for linux based OS.

  1. install udev, libusb and libhidapi:
sudo apt update
sudo apt-get install libudev-dev libusb-1.0-0-dev libhidapi-dev
  1. Configure such that non-root users have access.

Place a file in /etc/udev/rules.d/20-microchip.rules:

KERNEL=="hidraw*", ATTRS{idVendor}=="04d8", MODE="0666"

You might use this command line to create that file:

echo 'KERNEL=="hidraw*", ATTRS{idVendor}=="04d8", MODE="0666"' | sudo tee /etc/udev/rules.d/20-microchip.rules >/dev/null

Note: Make sure to (re-)plug the MCP2221 after this file is written!

Running the driver demo

  • Connect the MLX90640 to the MCP2221 I2C port
  • Connect the MCP2221 to your PC with the USB cable.
  • Open a terminal and run following command:
mlx90640-mcp2221-dump mcp://mcp:2221/0

This program takes 1 optional argument.

mlx90640-mcp2221-dump <communication-port>

Note: this dump command is not yet available!

Release files for mlx90640-driver-mcp2221 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mlx90640-driver-mcp2221 1.1.0
File Size Uploaded
mlx90640-driver-mcp2221-1.1.0.tar.gz 3.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mlx90640-driver-mcp2221 1.1.0
File Interpreter ABI Platform
mlx90640_driver_mcp2221-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 302.9 kB

Release files / mlx90640-driver-mcp2221-1.1.0.tar.gz

Download URL mlx90640-driver-mcp2221-1.1.0.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e06a181c451bc4a0db7083b2f2ce9497d3623cd55fa5b76439e81ae723d92e26
BLAKE2b-256 checksum
How to use checksums
a48dc0a7c7b170b06186e2d187aeb4ef1982e633a9fc32ac1cee1469543041a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Release files / mlx90640_driver_mcp2221-1.1.0-py3-none-any.whl

Download URL mlx90640_driver_mcp2221-1.1.0-py3-none-any.whl
Size 299.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5f5a45663802f717ee8bff5b0d70ef7a53343023f872cc283ee3c1ba808ab3a
BLAKE2b-256 checksum
How to use checksums
666ac37b46455b6215d7d2d77812faca1c25a9ecf2fe223aba67f4673b409b34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page