Arduino Function: SPI.begin


The Serial Peripheral Interface Bus or SPI bus is a synchronous serial data link standard named by Motorola that operates in full duplex mode. Devices communicate in a master/slave mode where the master device initiates the data frame. Multiple slave devices are allowed with individual slave select (chip select) lines using a pin for each device. The begin() method starts SPI communication.


SPI.begin(slaveSelectPin) (only for Arduino Due)
SPI.begin(pinMISO, pinMOSI,pinSCK) (only for Arduino Primo Core)


  • slaveSelectPin: slave device SS pin (only for Arduino DUE)

Only for the Arduino Primo Core is possible to change the SPI pins, specifying the new pins as parameters of function:
  • pinMISO: the pin number of new MISO (default is 4)
  • pinMOSI: the pin number of new MOSI (default is 5)
  • pinSCK: the pin number of new SCK (default is 6)

Based on the reference originally written by Arduino Community, and