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

本页目录

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

SPIOut

SPIOut 节点用于将数据发送到 MCU(通过 SPI)。 您可以在此处找到演示:https://github.com/luxonis/esp32-spi-message-demoSPIIn 用于从 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

需要帮助?

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