跳转到主要内容

MLX90640热像仪的驱动程序

项目描述

简介

Documentation Status Discord Build Status Code Style: Black

MLX90640热像仪的驱动程序

依赖项

此驱动程序依赖于

请确保所有依赖项在CircuitPython文件系统中可用。这可以通过下载Adafruit库和驱动程序包轻松实现。

从PyPI安装

在支持GNU/Linux系统(如树莓派)上,您可以从PyPI本地安装驱动程序。为当前用户安装

pip3 install adafruit-circuitpython-mlx90640

为系统安装(在某些情况下可能需要)

sudo pip3 install adafruit-circuitpython-mlx90640

在当前项目的虚拟环境中安装

mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-mlx90640

使用示例

import time
import board
import busio
import adafruit_mlx90640

i2c = busio.I2C(board.SCL, board.SDA, frequency=800000)

mlx = adafruit_mlx90640.MLX90640(i2c)
print("MLX addr detected on I2C", [hex(i) for i in mlx.serial_number])

# if using higher refresh rates yields a 'too many retries' exception,
# try decreasing this value to work with certain pi/camera combinations
mlx.refresh_rate = adafruit_mlx90640.RefreshRate.REFRESH_2_HZ

frame = [0] * 768
while True:
    try:
        mlx.getFrame(frame)
    except ValueError:
        # these happen, no biggie - retry
        continue

    for h in range(24):
        for w in range(32):
            t = frame[h*32 + w]
            print("%0.1f, " % t, end="")
        print()
    print()

文档

该库的API文档可以在Read the Docs上找到。

有关构建库文档的信息,请参阅此指南

贡献

欢迎贡献!在贡献之前,请阅读我们的行为准则,以帮助本项目保持开放友好。

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源代码分发

adafruit_circuitpython_mlx90640-1.3.2.tar.gz (35.0 kB 查看哈希值)

上传时间 源代码

构建分发

adafruit_circuitpython_mlx90640-1.3.2-py3-none-any.whl (10.2 kB 查看哈希值)

上传时间 Python 3

支持者

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面