MAX31856通用热电偶放大器的CircuitPython库。
项目描述
介绍
MAX31856通用热电偶放大器的CircuitPython驱动程序
依赖项
此驱动程序取决于:
请确保 CircuitPython 文件系统上的所有依赖项都可用。这可以通过下载 Adafruit 库和驱动程序包轻松实现。
从 PyPI 安装
在 Raspberry Pi 等受支持的 GNU/Linux 系统上,您可以从 PyPI本地安装驱动程序。为当前用户安装:
pip3 install adafruit-circuitpython-max31856
要在系统范围内安装(在某些情况下可能需要这样做):
sudo pip3 install adafruit-circuitpython-max31856
要在当前项目的虚拟环境中安装:
mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-max31856
使用示例
import board
import digitalio
import adafruit_max31856
# Create sensor object, communicating over the board's default SPI bus
spi = board.SPI()
# allocate a CS pin and set the direction
cs = digitalio.DigitalInOut(board.D5)
cs.direction = digitalio.Direction.OUTPUT
# create a thermocouple object with the above
thermocouple = adafruit_max31856.MAX31856(spi, cs)
# measure the temperature! (takes approx 160ms)
print(thermocouple.temperature)
# alternative (non-blocking) way to get temperature
thermocouple.initiate_one_shot_measurement()
# <perform other tasks>
# now wait for measurement to complete
while thermocouple.oneshot_pending:
pass
print(thermocouple.unpack_temperature())
文档
这个库的 API 文档可以在Read the Docs上找到。
有关构建库文档的信息,请查看本指南。
贡献
欢迎投稿! 在帮助这个项目保持受欢迎之前,请阅读我们的行为准则。
项目详情
关
adafruit_circuitpython_max31856-0.11.3 -py3-none-any.whl 的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | d9bb60fd38b74833a89fdb7f2c66bae9740c81b3df7a1d7a8eecb74f354e8ec8 |
|
| MD5 | bb54055178a814984a79c25fb5568fa7 |
|
| 布莱克2-256 | ff5b07cc73d868735ce79165542732411138b8a150b03295cd19b6c76e0501d2 |