SPIOut

SPIOut node is used for sending data to a MCU (via SPI). OAK-IOT devices have an on-board ESP32 that is connected to the VPU (MyriadX) 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

SPIOut node. Sends messages over SPI.

class Connection

Connection between an Input and Output

class Id

Node identificator. Unique for every node on a single Pipeline

Properties

alias of depthai.SPIOutProperties

getAssetManager(*args, **kwargs)

Overloaded function.

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

Get node AssetManager as a const reference

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

Get node AssetManager as a const reference

getInputRefs(*args, **kwargs)

Overloaded function.

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

Retrieves reference to node inputs

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

Retrieves reference to node inputs

getInputs(self: depthai.Node) → List[depthai.Node.Input]

Retrieves all nodes inputs

getName(self: depthai.Node)str

Retrieves nodes name

getOutputRefs(*args, **kwargs)

Overloaded function.

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

Retrieves reference to node outputs

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

Retrieves reference to node outputs

getOutputs(self: depthai.Node) → List[depthai.Node.Output]

Retrieves all nodes outputs

getParentPipeline(*args, **kwargs)

Overloaded function.

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

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

property id

Id of node

property input

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

Default queue is blocking with size 8

setBusId(self: depthai.node.SPIOut, id: int)None

Specifies SPI Bus number to use

Parameter id:

SPI Bus id

setStreamName(self: depthai.node.SPIOut, name: str)None

Specifies stream name over which the node will send data

Parameter name:

Stream name

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 id)

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

constexpr const char *NAME = "SPIOut"

Got questions?

We’re always happy to help with code or other questions you might have.