CircuitPython库,用于MAX31856通用热电偶放大器。
项目描述
简介
MAX31856通用热电偶放大器的CircuitPython驱动程序
依赖关系
此驱动程序依赖于
请确保所有依赖项都可在CircuitPython文件系统中使用。这可以通过下载Adafruit库和驱动程序包轻松实现。
从PyPI安装
在支持GNU/Linux系统(如Raspberry Pi)上,您可以从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.12.0.tar.gz
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 76b62aada540d699b4fa811cd1287fe2db0c7d5748c94eee7ddf96347e2bad75 |
|
MD5 | 90b47c9f04356d1a6c0263189b42f35e |
|
BLAKE2b-256 | 2e7293c7c518d13cb682d2d601c71476b2c0fdd027e471d4cc401d90f321bef6 |
关闭
哈希值 用于 adafruit_circuitpython_max31856-0.12.0-py3-none-any.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 14641e4012bb98eb73196692ada83c1886ad15497ea0723d44b8ac75e0b9f9f4 |
|
MD5 | 11d32f480759922e4dfe9c4f9c7cf025 |
|
BLAKE2b-256 | 93050a52a8716323238e8f854570b0faa6302c63d28738ee9a43b496cac950d2 |