A few weeks ago I came across a very cool project on adafruit. The project combined a LED matrix display along with a 3 axis accelerator to render an interactive sand grain animation. I had most of the parts available at hand except for the exact accelerometer. Luckly the code was flexible enough to work with a variety of accelerometers.

So I modified the code to work with ADXL362 instead of the LIS3DH.

I soldered the adxl362 breakout board directly underneath the M0 feather.

The wiring is very straightforward. The CharlieWing is connected to the M0 via the I2C pins, while the ADXL362 breakout board is connected to the SPI pins of the M0. Please note that for the ADXL362 Chip Select pin, I used pin 11 of the M0 instead of the default pin 10. The I2C library was for some reason interfering with the use of pin 10.

Here is the modified code to use ADXL362 in SPI mode with the CS line connected to pin 11 of the M0 feather. You’ll need to add ADXL362 library in your Arduino IDE for this to work.