setClockDivider()

This function should not be used in new projects. Use SPISettings with beginTransaction() to configure SPI parameters.
Sets the SPI clock divider relative to the system clock. The default setting is SPI_CLOCK_DIV4, which sets the SPI clock to one-quarter the frequency of the system clock (10 Mhz for the boards at 40 MHz).
SPI.setClockDivider(divider)
SPI.setClockDivider(divider, slaveSelectPin)
divider:
  • SPI_CLOCK_DIV2
  • SPI_CLOCK_DIV4
  • SPI_CLOCK_DIV8
  • SPI_CLOCK_DIV16
  • SPI_CLOCK_DIV32
  • SPI_CLOCK_DIV64
  • SPI_CLOCK_DIV128
slaveSelectPin: slave device SS pin.
None