device
Connection to device on SPI bus on Arduino or ESP32 hardware
Add-On Required: This feature requires the MATLAB Support Package for Arduino Hardware add-on.
Description
This object represents a connection to the SPI device on Arduino® or ESP32 hardware. Attach an SPI device to the appropriate pins on the Arduino or ESP32 hardware. You can interact with the SPI device using the functions listed in Object Functions.
Creation
Description
creates an object that represents the connection between SPI device connected to the SPI
bus on the Arduino or ESP32 hardware. The Arduino or ESP32 hardware is represented by an deviceObj
= device(arduinoObj
,'SPIChipSelectPin',SPIChipSelectPin
,Name,Value
)arduino
object.
You can also customize the connection further using one or more name-value pairs. The
'SPIChipSelectPin'
name-value pair is mandatory for creating the SPI
device connection.
Input Arguments
Name-Value Arguments
Properties
Object Functions
writeRead | Write and read data from SPI device |
Examples
More About
Version History
Introduced in R2019a