I was reading through this thread adxl362 proton and want to do similar but I have an Electron.
Looking at the pinout - the Electron has two SPI so I am confused on the proper wiring and also, what in the code would have to be changed to reflect either of the SPI?
Thanks much for the assist, but I can only get the ADXL362 to work using SPI (on the ADC side - same as the Particle configuration in the previous table above).
Now the question is, how can I use SPI1 or SPI2 (C & D pins) for this device instead of SPI? Is this possible and just has to be changed in the code library adxl362.h?
As it appears the library you are using does not provide any means to select the desired SPI interface, hence you are stuck with SPI unless you find a library that does (e.g. ADXL362DMA) or copy/paste the library files into your project and adapt it (in the .cpp file) accordingly.
Yup, that seems to be an Arduino remnant, but pin 10 would map to A0 on the Electron.
However, you can choose whatever pin you have available for any of the SPI interfaces.
It's strongly discouraged to use the anonymous pin numbers.
While you can use them and the mapping D0..D7 = 0..7 and A0..A7 = 10..17 for the Photon (and Electron) allows for a one-to-one translation there are no guarantees that this will be the case for B&C pins nor for future generations (including current Gen3).
On Electron 8 is no usable pin number.
BTW, all GPIO pins (including A#) can be used as standard digital IOs and as said any free digital IO can be used as SS for any SPI interface.