DepthAI v2 has been superseded by DepthAI v3. You are viewing legacy documentation.
此页面由 AI 自动翻译。查看英文原版

本页目录

  • 如何放置
  • 输入和输出
  • 用法
  • 功能示例
  • 参考

SPIIn

SPIIn 节点用于接收从 MCU 发送过来的数据(通过 SPI)。 您可以在 此处 找到演示。这允许您例如控制 ColorCameraImageManip 等节点,或者将数据 Buffer 从 MCU 发送到 Script 节点。SPIOut 用于将数据从 VPU 发送到 MCU(通过 SPI)。

如何放置

Python

Python
1pipeline = dai.Pipeline()
2spi = pipeline.create(dai.node.SPIIn)

C++

C++
1dai::Pipeline pipeline;
2auto spi = pipeline.create<dai::node::SPIIn>();

输入和输出

用法

Python

Python
1pipeline = dai.Pipeline()
2spi = pipeline.create(dai.node.SPIIn)
3
4spi.setStreamName("control")
5spi.setBusId(0)

C++

C++
1dai::Pipeline pipeline;
2auto spi = pipeline.create<dai::node::SPIIn>();
3
4spi->setStreamName("control");
5spi->setBusId(0);

功能示例

参考

class

depthai.node.SPIIn(depthai.Node)

method
method
getMaxDataSize(self) -> int: int
Get maximum messages size in bytes
method
getNumFrames(self) -> int: int
Get number of frames in pool
method
method
setBusId(self, id: typing.SupportsInt)
Specifies SPI Bus number to use  Parameter ``id``:     SPI Bus id
method
setMaxDataSize(self, maxDataSize: typing.SupportsInt)
Set maximum message size it can receive  Parameter ``maxDataSize``:     Maximum size in bytes
method
setNumFrames(self, numFrames: typing.SupportsInt)
Set number of frames in pool for sending messages forward  Parameter ``numFrames``:     Maximum number of frames in pool
method
setStreamName(self, name: str)
Specifies stream name over which the node will receive data  Parameter ``name``:     Stream name
property
out
Outputs message of same type as send from host.

需要帮助?

请前往 Discussion Forum 获取技术支持或提出您可能有的任何其他问题。