-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
I was wondering if it would be valuable to update some of the SPI code. I'm referring to lines 49-52 in "SparkFun_ADXL345.cpp":
SPI.begin();
SPI.setDataMode(SPI_MODE3);
pinMode(_CS, OUTPUT);
digitalWrite(_CS, HIGH);
It seems that SPI.setDataMode() is deprecated (https://www.arduino.cc/en/Reference/SPISetDataMode) and that SPISettings(), SPI.beginTransaction() and SPI.endTransaction() should be used in the writeToSPI() and readFromSPI() functions.
Also, is it necessary to pull CS/SS high, since SPI.begin() says it does this already? https://www.arduino.cc/en/Reference/SPIBegin
Metadata
Metadata
Assignees
Labels
No labels