# Raspberry Pi Pico + ADXL345: Portable resonance measurement

**URL:** <https://klipper.discourse.group/t/raspberry-pi-pico-adxl345-portable-resonance-measurement/1757>\
**Category:** Configs\
**Created:** [January 14, 2022, 10:59am UTC](https://klipper.discourse.group/t/raspberry-pi-pico-adxl345-portable-resonance-measurement/1757 "2022-01-14T10:59:24Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![w00sh](https://avatars.discourse-cdn.com/v4/letter/w/b5ac83/32.png) [@w00sh](https://klipper.discourse.group/u/w00sh)\
**Post date:** [January 16, 2022, 11:36pm UTC](https://klipper.discourse.group/t/raspberry-pi-pico-adxl345-portable-resonance-measurement/1757/5 "2022-01-16T23:36:41Z")

</div>

I configured everything as per instructions, however I’m getting an error when querying the ADXL345. ‘got f2 vs e5’

I know that the PICO and ADXL345 are working because I can access it via microPython (via SPI) just fine.

Few questions:  
Where does spi0a come from? Given gpio notation, it seems to me it should be pico:spi0? Could it be that my other mcu SPI is being used?  
EDIT: as per reddit linked above CS pin determines mcu being used, so I suppose the correct SPI port is being opened…  
How can I bypass device ID detection?  
Is there anything else I can try to troubleshoot this?

EDIT2: turns out I just needed to give it some time before spi starts working.

For reference it appears it took about 30 seconds for SPI port to be available for some reason:

```auto
00:30:02 !! Lost communication with MCU 'pico'
00:30:09 $ FIRMWARE_RESTART
00:30:34 // Klipper state: Ready
00:30:42 $ ACCELEROMETER_QUERY
00:30:42 // Invalid adxl345 id (got f2 vs e5).
// This is generally indicative of connection problems
// (e.g. faulty wiring) or a faulty adxl345 chip.
00:30:42 !! Invalid adxl345 id (got f2 vs e5).
00:31:04 $ ACCELEROMETER_QUERY
00:31:05 // adxl345 values (x, y, z): 2677.215450, -1988.788620, 15910.308960

```

Heh, I take it back. It appears that first access after reboot results in an error. No matter the time that have passed.

---

_[View the full topic](https://klipper.discourse.group/t/raspberry-pi-pico-adxl345-portable-resonance-measurement/1757)._
