52梯控论坛
标题:
532的文章
[打印本页]
作者:
辽宁赵氏开锁
时间:
2026-10-29 12:39
标题:
532的文章
适用场景
adafruit/Adafruit_CircuitPython_PN532
原理简述
简介
============
.. image:: https://readthedocs.org/projects/adafruit-circuitpython-pn532/badge/?version=latest
:target: https://docs.circuitpython.org/projects/pn532/en/latest/
:alt: 文档状态
.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg
:target: https://adafru.it/discord
:alt: Discord
.. image:: https://github.com/adafruit/Adafruit_CircuitPython_PN532/workflows/Build%20CI/badge.svg
:target: https://github.com/adafruit/Adafruit_CircuitPython_PN532/actions/
:alt: 构建状态
.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json
:target: https://github.com/astral-sh/ruff
:alt: 代码风格:Ruff
用于 `PN532 NFC/RFID Breakout <https://www.adafruit.com/product/364>`_ 和 `PN532 NFC/RFID Shield <https://www.adafruit.com/product/789>`_ 的 CircuitPython 驱动
依赖
=============
本驱动依赖:
* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_
* `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice>`_
请确保所有依赖项在 CircuitPython 文件系统中均可用。
下载 `Adafruit 库与驱动包 <https://github.com/adafruit/Adafruit_CircuitPython_Bundle>`_ 即可轻松完成。
从 PyPI 安装
--------------------
在受支持的 GNU/Linux 系统(如树莓派)上,你可以从 `PyPI <https://pypi.org/project/adafruit-circuitpython-pn532/>`_ 本地安装该驱动。为当前用户安装:
.. code-block:: shell
pip3 install adafruit-circuitpython-pn532
系统级安装(某些情况下可能需要):
.. code-block:: shell
sudo pip3 install adafruit-circuitpython-pn532
在当前项目的虚拟环境中安装:
.. code-block:: shell
mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install adafruit-circuitpython-pn532
使用示例
=============
使用示例请查看 examples/pn532_simpletest.py
文档
=============
本库的 API 文档可在 `Read the Docs <https://docs.circuitpython.org/projects/pn532/en/latest/>`_ 上找到。
有关构建库文档的信息,请查看 `本指南 <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1>`_。
贡献
============
欢迎贡献!在参与贡献之前,请阅读我们的 `行为准则
<https://github.com/adafruit/adafruit_CircuitPython_PN532/blob/main/CODE_OF_CONDUCT.md>`_,
以帮助本项目保持友好氛围。
注意事项
仅用于自有设备与合法技术调试。
资料来源
https://github.com/adafruit/Adafruit_CircuitPython_PN532
欢迎光临 52梯控论坛 (https://52tikong.com/)
Powered by Discuz! X3.4