SPIIn
SPIIn node is used for receiving data that was sent from a MCU (via SPI). You can find demos here.This allows you for example to control eg. ColorCamera or ImageManip from the MCU or send a Buffer of data from the MCU to a Script node.SPIOut is used for sending data from the VPU to a MCU (via SPI).How to place it
Python
C++
Python
Python
1pipeline = dai.Pipeline()
2spi = pipeline.create(dai.node.SPIIn)
Inputs and Outputs
Usage
Python
C++
Python
Python
1pipeline = dai.Pipeline()
2spi = pipeline.create(dai.node.SPIIn)
3
4spi.setStreamName("control")
5spi.setBusId(0)
Examples of functionality
Reference
class
dai::node::SPIIn
variable
Output out
Outputs message of same type as send from host.
function
void setStreamName(const std::string & name)
Specifies stream name over which the node will receive data
Parameters
- name: Stream name
function
void setBusId(int id)
Specifies SPI Bus number to use
Parameters
- id: SPI Bus id
function
void setMaxDataSize(std::uint32_t maxDataSize)
Set maximum message size it can receive
Parameters
- maxDataSize: Maximum size in bytes
function
void setNumFrames(std::uint32_t numFrames)
Set number of frames in pool for sending messages forward
Parameters
- numFrames: Maximum number of frames in pool
function
std::string getStreamName()
function
int getBusId()
function
std::uint32_t getMaxDataSize()
function
std::uint32_t getNumFrames()
function
void buildInternal()
inline function
DeviceNodeCRTP()
inline function
DeviceNodeCRTP(const std::shared_ptr< Device > & device)
inline function
DeviceNodeCRTP(std::unique_ptr< Properties > props)
inline function
DeviceNodeCRTP(std::unique_ptr< Properties > props, bool confMode)
inline function
DeviceNodeCRTP(const std::shared_ptr< Device > & device, std::unique_ptr< Properties > props, bool confMode)
Need assistance?
Head over to Discussion Forum for technical support or any other questions you might have.