LoRa Thing Plus expLoRaBLE + ADXL313 Lib Error

Hi All

So i bought a couple of the LoRa Thing Plus expLoRaBLE boards to be used with ADXL313 qwiic breakout boards but I’m getting errors when using the SparkFun ADXL313 library, this is the error I receive and it seems like a peripherals setup error. can someone confirm this and maybe shed some light as to where to start looking to fix this

C:\Users\12266\Documents\Arduino\libraries\SparkFun_ADXL313_Arduino_Library\src\SparkFunADXL313.cpp: In member function 'boolean ADXL313::beginSPI(uint8_t)':
C:\Users\12266\Documents\Arduino\libraries\SparkFun_ADXL313_Arduino_Library\src\SparkFunADXL313.cpp:78:6: error: 'class arduino::MbedSPI' has no member named 'setDataMode'
  SPI.setDataMode(SPI_MODE3);
      ^~~~~~~~~~~
exit status 1
Error compiling for board LoRa Thing Plus expLoRaBLE.

This post https://forum.arduino.cc/t/nano-33-ble- … ues/647083 should shed some light :wink:

No idea how that helps…

In C:\Users\12266\Documents\Arduino\libraries\SparkFun_ADXL313_Arduino_Library\src\SparkFunADXL313.cpp, try replacing

SPI.setDataMode(SPI_MODE3);

with

SPI.beginTransaction(SPISettings(500000, MSBFIRST, SPI_MODE3));

(actually, you should be able to just comment it out since QWIIC uses I2C, not SPI…)

/mike

Thank you ! that solved the issue, I had to replace the line with the suggested, commenting it out resulted in error