Skip to main content

Python library for MLX90640-41

Project description

Intro

This python driver for MLX90640 and MLX90641 aims to facilitate the interfacing on a PC.

Currently this driver supports 3 type of interfaces:

Dependencies

Driver:

  • Python3
  • pySerial

Getting started

Installation

pip install mlx9064x-driver

Running the driver demo

  • Connect the EVB to your PC.
  • pen a terminal and run following command:
mlx9064x-dump-frame auto

This program takes 1 optional argument.

mlx9064x-dump-frame <communication-port>

<communication-port> can be:

  • auto (default) search for comport with EVB90640 hardware as interface to MLX90640 or MLX90641.
  • COMx comport on windows platform for EVB90640 HW, where x is the comport number.
  • /dev/ttyUSBx comport on linux platform for EVB90640 HW, where x is the comport number.
  • /dev/ttyACMx comport on raspberry pi linux platform for EVB90640 HW, where x is the comport number.
  • I2C-1 on raspberry pi use the I2C hardware; it requires raspi-config to enable i2c hardware.
  • I2CBB-<sda>-<scl> [I2CBB-03-05] on raspberry pi, with BitBanging software I2C on any GPIO pin.
    • <sda> is a 2-digit number of the physical pin (default: 03)
    • <scl> is a 2-digit number of the physical pin (default: 05)

Note: Physical pin numbers: see right side numbers in this picture: https://pinout.xyz/

Usage

Below you can find an example on how to read a frame of the MLX90640 senor with I2C address 0x33 and frame rate 8Hz. Please look into EVB90640.py for more advanced features.

import mlx.mlx90640 as mlx

dev = mlx.Mlx9064x('COM4', 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
dev.init()                      # read EEPROM and pre-compute calibration parameters.
frame = dev.read_frame()        # Read a frame from MLX90640
                                # In case EVB90640 hw is used, the EVB will buffer up to 4 frames, so possibly you get a cached frame.
f = dev.do_compensation(frame)  # calculates the temperatures for each pixel

Issues and new Features

In case you have any problems with usage of the plugin, please open an issue on GitHub.
Provide as many valid information as possible, as this will help us to resolve Issues faster.
We would also like to hear your suggestions about new features which would help your Continuous Integration run better.

Raspberry pi 3B+

This driver is validated to work on a Rapberry Pi 3B+ configuration with raspbian buster february 2020 release.

Installation

  • sudo raspi-config
    • 'enable i2c' in interface; in case you want to connect MLX9064x on the I2C bus of RPi.
    • optional: 'enable ssh' in interface; now you can login remotely over the network.
  • sudo pip3 install virtualenv
  • optional: sudo apt-get update
  • optional: sudo apt-get install python3-opencv
  • optional: sudo apt-get install qt5-default
  • optional: sudo apt-get install libatlas-base-dev
  • optional: sudo apt-get install python3-scipy
  • cd <mlx90640-py>
  • virtualenv --system-site-packages pyvenv
  • . pyvenv/bin/activate
  • pip install .

Note:

  • output of sudo apt-get update must look like:
Get:1 http://archive.raspberrypi.org/debian buster InRelease [25.2 kB]
Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Get:3 http://archive.raspberrypi.org/debian buster/main armhf Packages [259 kB]
Get:4 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0 MB]
Fetched 13.3 MB in 17s (767 kB/s)
Reading package lists... Done

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mlx9064x-driver-1.2.4.tar.gz (22.5 kB view details)

Uploaded Source

Built Distribution

mlx9064x_driver-1.2.4-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

Details for the file mlx9064x-driver-1.2.4.tar.gz.

File metadata

  • Download URL: mlx9064x-driver-1.2.4.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for mlx9064x-driver-1.2.4.tar.gz
Algorithm Hash digest
SHA256 b2e2bd938b363432162db3636d77058888626f1e3d5155a6f83b228f68ecab52
MD5 ca36130e40b62e2d1d4a3214415b2fbb
BLAKE2b-256 330df15d7863ace34ff2706fa8d37263131d9e26487c538a8b0bee4c3a4b5375

See more details on using hashes here.

File details

Details for the file mlx9064x_driver-1.2.4-py3-none-any.whl.

File metadata

  • Download URL: mlx9064x_driver-1.2.4-py3-none-any.whl
  • Upload date:
  • Size: 24.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for mlx9064x_driver-1.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7d7b859704c02590c73451ddc86f5d2a152b7e92f1bf4e3ee0f5bfc5ce1523d1
MD5 ac5b561c7000a0b6c7a147f279e88311
BLAKE2b-256 3aab3d482bf5220c843bd482cbdb358931f513bfa9c2ca65a73b844693ffcf73

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page