Write data to and read data from an SPI device
Simulink Support Package for Arduino Hardware / Common
Write data to and read data from an SPI device connected to your Arduino board. Using this block, you can access an SPI device to measure quantities such as temperature, and pressure. You can also access an SPI device to support WiFi connectivity, and to access an SD card to store data.
Click View pin map to open the Arduino Pin Mapping table .
To know how to assign pins for the block, see Arduino Pin Mapping for Timer Independent Blocks.
This limitation is not applicable when using Arduino® MKR1000, Arduino MKR WIFI 1010, and Arduino MKR ZERO boards.
In a Simulink®model, the SPI WriteRead block is supported only if:
No blocks from the Ethernet shield library or the WiFi library are already present in the model.
External mode is over serial.