DepthAI v2 has been superseded by DepthAI v3. You are viewing legacy documentation.

本页目录

  • 如何放置
  • 输入与输出
  • 使用
  • 功能示例
  • 参考

SPIOut

SPIOut 节点用于向 MCU 发送数据(通过 SPI)。 你可以在此处找到演示。SPIIn 用于从 MCU 接收数据(通过 SPI)。

如何放置

Python

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

C++

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

输入与输出

使用

Python

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

C++

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

功能示例

参考

class

depthai.node.SPIOut(depthai.Node)

method
setBusId(self, id: typing.SupportsInt)
Specifies SPI Bus number to use  Parameter ``id``:     SPI Bus id
method
setStreamName(self, name: str)
Specifies stream name over which the node will send data  Parameter ``name``:     Stream name
property
input
Input for any type of messages to be transferred over SPI stream  Default queue is blocking with size 8

需要帮助?

请前往 OAKChina 官网 获取技术支持或解答您的任何疑问。