SPIOut

SPIOut node is used to send data through to a MCU via SPI. LUX-ESP32 module has integrated an integrated ESP32 connected to the MyriadX via SPI. You can find demos here.

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 transfered 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::Node

SPIOut node. Sends messages over SPI.

Public Types

using Properties = dai::SPIOutProperties

Public Functions

std::string getName() const override

Retrieves nodes name.

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, {{DatatypeEnum::Buffer, true}}}

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

Default queue is blocking with size 8

Private Functions

nlohmann::json getProperties() override
std::shared_ptr<Node> clone() override

Private Members

Properties properties

Got questions?

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