SPIOut

SPIOut node is used for sending data to a MCU (via SPI). You can find demos here.

SPIIn is used for receiving data from the MCU (via SPI).

How to place it

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

Inputs and Outputs

          ┌──────────────┐
          │              │
input     │              │ SPI (to MCU)
─────────►│    SPIOut    ├------------►
          │              │
          │              │
          └──────────────┘

Message types

  • input - Any

Usage

pipeline = dai.Pipeline()
spi = pipeline.create(dai.node.SPIOut)

spi.setStreamName("spimetaout")
spi.setBusId(0)
dai::Pipeline pipeline;
auto spi = pipeline.create<dai::node::SPIOut>();

spi->setStreamName("spimetaout");
spi->setBusId(0);

Examples of functionality

Reference

class depthai.node.SPIOut
class Id

Node identificator. Unique for every node on a single Pipeline

getAssetManager(*args, **kwargs)

Overloaded function.

  1. getAssetManager(self: depthai.Node) -> depthai.AssetManager

  2. getAssetManager(self: depthai.Node) -> depthai.AssetManager

getInputRefs(*args, **kwargs)

Overloaded function.

  1. getInputRefs(self: depthai.Node) -> list[depthai.Node.Input]

  2. getInputRefs(self: depthai.Node) -> list[depthai.Node.Input]

getInputs(self: depthai.Node)list[depthai.Node.Input]
getName(self: depthai.Node)str
getOutputRefs(*args, **kwargs)

Overloaded function.

  1. getOutputRefs(self: depthai.Node) -> list[depthai.Node.Output]

  2. getOutputRefs(self: depthai.Node) -> list[depthai.Node.Output]

getOutputs(self: depthai.Node)list[depthai.Node.Output]
getParentPipeline(*args, **kwargs)

Overloaded function.

  1. getParentPipeline(self: depthai.Node) -> depthai.Pipeline

  2. getParentPipeline(self: depthai.Node) -> depthai.Pipeline

setBusId(self: depthai.node.SPIOut, id: int)None
setStreamName(self: depthai.node.SPIOut, name: str)None
class dai::node::SPIOut : public dai::NodeCRTP<Node, SPIOut, SPIOutProperties>

SPIOut node. Sends messages over SPI.

Public Functions

SPIOut(const std::shared_ptr<PipelineImpl> &par, int64_t nodeId, std::unique_ptr<Properties> props)
SPIOut(const std::shared_ptr<PipelineImpl> &par, int64_t nodeId)
void setStreamName(std::string name)

Specifies stream name over which the node will send data

Parameters
  • name: Stream name

void setBusId(int busId)

Specifies SPI Bus number to use

Parameters
  • id: SPI Bus id

Public Members

Input input = {*this, "in", Input::Type::SReceiver, true, 8, true, {{DatatypeEnum::Buffer, true}}}

Input for any type of messages to be transferred over SPI stream

Default queue is blocking with size 8

Public Static Attributes

static constexpr const char *NAME = "SPIOut"

Got questions?

Head over to Discussion Forum for technical support or any other questions you might have.