用于控制max31855热电偶传感器芯片的circuitpython库。
adafruit-circuitpython-max31855的Python项目详细描述
简介图片::https://readthedocs.org/projects/adafruit-circipython-max31855/badge/?version=latest
:目标:https://circuitpython.readthedocs.io/projects/max31855/en/latest/
:alt:文档状态
…图片::https://img.shields.io/discord/327254708534116352.svg
:目标:https://discord.gg/nbqh6qu
:alt:discord
图片::https://travis-ci.com/adafruit/adafruit_circuitpython_max31855.svg?branch=master
:target:https://travis ci.com/adafruit/adafruit_circuitpython_max31855
:alt:build status
circuitpython驱动程序,用于“max31855热电偶放大器分线<;https://www.adafruit.com/product/269>;`
依赖项
===
此驱动程序依赖于:
*`adafruit circuitpython<;https://github.com/adafruit/circuitpython>;``u
*`bus device<;https://github.com/adafruit/adafruit circuitpython&u busdevice>;`
请确保circuitpython文件系统上的所有依赖项都可用。
这可以通过下载
` adafruit库和驱动程序包<;https://github.com/adafruit/adafruit_circuitpython_bundle>;``来轻松实现。
必须导入库才能使用它:
…代码::python
import adafruit_max31855
您可以为CS使用任何管脚,但我们在这里使用D5:
…代码::python
from busio import spi
from digitalio import digitalinout
cs=digitalinout(board.d5)
代码::python
sensor=adafruit\u max31855.max31855(spi,cs)
,您可以开始测量:
……代码::python
print(sensor.temperature)
如果需要,您必须自己将其转换为
其他单位。
请阅读我们的“行为准则”
<;https://github.com/adafruit/adafruit_circuitpython_max21855/blob/master/code_conduct.md>;`
在帮助该项目保持受欢迎之前。
https://github.com/adafruit/circuitpython build tools>;``包。
…代码块::shell
python3-m venv.env
source.env/bin/activate
pip install circuitpython编译工具
代码块::shell
source.env/bin/activate
,然后运行生成:
。代码块::shell
circuitpython build bundles——文件名前缀adafruit-circuitpython-max31855——库位置。
sphinx documentation
----
安装依赖项(请随意重用上面的虚拟环境):
…代码块::shell
source.env/bin/activate
pip安装sphinx sphinx rtd主题
代码块:shell
cd docs
sphinx build-e-w-b html。_ build/html
这将把文档输出到“docs/u build/html”。在浏览器中打开index.html以查看它们。它还将(由于-w)错误的任何警告,像特拉维斯将。这是
本地验证它是否通过的好方法。
:目标:https://circuitpython.readthedocs.io/projects/max31855/en/latest/
:alt:文档状态
…图片::https://img.shields.io/discord/327254708534116352.svg
:目标:https://discord.gg/nbqh6qu
:alt:discord
图片::https://travis-ci.com/adafruit/adafruit_circuitpython_max31855.svg?branch=master
:target:https://travis ci.com/adafruit/adafruit_circuitpython_max31855
:alt:build status
circuitpython驱动程序,用于“max31855热电偶放大器分线<;https://www.adafruit.com/product/269>;`
依赖项
===
此驱动程序依赖于:
*`adafruit circuitpython<;https://github.com/adafruit/circuitpython>;``u
*`bus device<;https://github.com/adafruit/adafruit circuitpython&u busdevice>;`
请确保circuitpython文件系统上的所有依赖项都可用。
这可以通过下载
` adafruit库和驱动程序包<;https://github.com/adafruit/adafruit_circuitpython_bundle>;``来轻松实现。
必须导入库才能使用它:
…代码::python
import adafruit_max31855
您可以为CS使用任何管脚,但我们在这里使用D5:
…代码::python
from busio import spi
from digitalio import digitalinout
代码::python
sensor=adafruit\u max31855.max31855(spi,cs)
,您可以开始测量:
……代码::python
print(sensor.temperature)
如果需要,您必须自己将其转换为
其他单位。
请阅读我们的“行为准则”
<;https://github.com/adafruit/adafruit_circuitpython_max21855/blob/master/code_conduct.md>;`
在帮助该项目保持受欢迎之前。
https://github.com/adafruit/circuitpython build tools>;``包。
…代码块::shell
python3-m venv.env
source.env/bin/activate
pip install circuitpython编译工具
代码块::shell
source.env/bin/activate
,然后运行生成:
。代码块::shell
circuitpython build bundles——文件名前缀adafruit-circuitpython-max31855——库位置。
sphinx documentation
----
…代码块::shell
pip安装sphinx sphinx rtd主题
代码块:shell
cd docs
sphinx build-e-w-b html。_ build/html
这将把文档输出到“docs/u build/html”。在浏览器中打开index.html以查看它们。它还将(由于-w)错误的任何警告,像特拉维斯将。这是
本地验证它是否通过的好方法。