I had an issue where I wanted to use digital pin 10 on the Arduino Nano for a purpose other than chip select, but the pin state was changing at boot when I did not expect it to.
I traced this to the initSPI method, which uses the hardcoded SS define rather than the selectPin variable.
This change fixes this in initSPI, as well as ensuring that selectPin is correctly set before initSPI is called.
I had an issue where I wanted to use digital pin 10 on the Arduino Nano for a purpose other than chip select, but the pin state was changing at boot when I did not expect it to.
I traced this to the
initSPI
method, which uses the hardcodedSS
define rather than theselectPin
variable.This change fixes this in
initSPI
, as well as ensuring thatselectPin
is correctly set beforeinitSPI
is called.