# SPIOut

SPIOut node is used for sending data to a MCU (via SPI). You can find demos
[here](https://github.com/luxonis/esp32-spi-message-demo).

[SPIIn](https://docs.luxonis.com/software/depthai-components/nodes/spi_in.md) is used for receiving data from the MCU (via SPI).

## How to place it

#### Python

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

#### C++

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

## Inputs and Outputs

## Usage

#### Python

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

spi.setStreamName("spimetaout")
spi.setBusId(0)
```

#### C++

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

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

## Examples of functionality

 * [SPI code demos with ESP32](https://github.com/luxonis/esp32-spi-message-demo)

## Reference

### depthai.node.SPIOut(depthai.Node)

Kind: Class

SPIOut node. Sends messages over SPI.

#### setBusId(self, id: typing.SupportsInt)

Kind: Method

Specifies SPI Bus number to use

Parameter ``id``:
SPI Bus id

#### setStreamName(self, name: str)

Kind: Method

Specifies stream name over which the node will send data

Parameter ``name``:
Stream name

#### input

Kind: Property

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

Default queue is blocking with size 8

### Need assistance?

Head over to [Discussion Forum](https://discuss.luxonis.com/) for technical support or any other questions you might have.
