# No adxl345 measurements found error

**URL:** <https://klipper.discourse.group/t/no-adxl345-measurements-found-error/890>\
**Category:** General Discussion\
**Created:** [September 10, 2021, 10:41pm UTC](https://klipper.discourse.group/t/no-adxl345-measurements-found-error/890 "2021-09-10T22:41:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![elims](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/elims/32/400_2.png) [@elims](https://klipper.discourse.group/u/elims)\
**Post date:** [September 10, 2021, 10:41pm UTC](https://klipper.discourse.group/t/no-adxl345-measurements-found-error/890/1 "2021-09-10T22:41:29Z")

</div>

Hi,

the last couple of days I’ve been converting my printer from Reprapfirmware on a Duet 2 Wifi over to Klipper. Now everything is running, except I can’t get the ADXL345 accelerometer to work. I followed the tutorial, connected the ADXL to my RPI, enabled SPI in raspi\_config and updated my printer.cfg. When I issue ACCELEROMETER\_QUERY I do get an “!! No adxl345 measurements found” error. Checking with klippy.log it states:

```auto
API Dump Helper start callback error
Traceback (most recent call last):
  File "/home/pi/klipper/klippy/extras/motion_report.py", line 39, in _start
    self.startstop_cb(True)
  File "/home/pi/klipper/klippy/extras/adxl345.py", line 400, in _api_startstop
    self._start_measurements()
  File "/home/pi/klipper/klippy/extras/adxl345.py", line 352, in _start_measurements
    self.set_reg(REG_POWER_CTL, 0x00)
  File "/home/pi/klipper/klippy/extras/adxl345.py", line 267, in set_reg
    reg, val, stored_val))
CommandError: Failed to set ADXL345 register [0x2d] to 0x0: got 0xcb. This is generally indicative of connection problems (e.g. faulty wiring) or a faulty adxl345 chip.

```

I double checked my wiring, rebooted the PI, recompiled mcu firmwares for rpi and duet. No luck. When checking the ADXL from SSH with adxl345spi ([GitHub - nagimov/adxl345spi: ADXL345 three-axis accelerometer reader (SPI interface)](https://github.com/nagimov/adxl345spi)) I do receive valid data. So I assume my chip and wiring are generally okay.

I even tried to use an SPI port on the duet, but the problem persist.

Did I miss anything? Input shaper was a huge motivation to switch from reprapfirmware to klipper. I really would like to use the accelerometer.

Many thanks,  
elims

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [September 10, 2021, 10:57pm UTC](https://klipper.discourse.group/t/no-adxl345-measurements-found-error/890/2 "2021-09-10T22:57:25Z")

</div>

Please post your `klippy.log` file

---

<div class="post-metadata">

**Author:** ![elims](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/elims/32/400_2.png) [@elims](https://klipper.discourse.group/u/elims)\
**Post date:** [September 10, 2021, 11:02pm UTC](https://klipper.discourse.group/t/no-adxl345-measurements-found-error/890/3 "2021-09-10T23:02:18Z")

</div>

Let’s see if this is working. I was told by the bot that I first need to advance to level 1 before being granted the permission to upload files.

Here it should be:  
[klippy (2).log](https://klipper.discourse.group/uploads/short-url/qPktCQzIWlHXiMvbVM0MuCa6YcF.log) (54.3 KB)

---

<div class="post-metadata">

**Author:** ![Sineos](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/sineos/32/18_2.png) [@Sineos](https://klipper.discourse.group/u/Sineos)\
**Post date:** [September 11, 2021, 11:28am UTC](https://klipper.discourse.group/t/no-adxl345-measurements-found-error/890/4 "2021-09-11T11:28:26Z")

</div>

See here: [ADXL345 Invalid ID · Issue #3637 · KevinOConnor/klipper · GitHub](https://github.com/KevinOConnor/klipper/issues/3637#issuecomment-782221300)

Such errors were found to be either:

- Cable length / quality
- Different GND potentials
- Pull Ups on the ADXL board

Config-wise it seems OK, although you have some strange surplus line breaks, but they should not cause the issue:

```auto
[resonance_tester]
accel_chip = adxl345
probe_points = 
	100,90,20

```

---

<div class="post-metadata">

**Author:** ![elims](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/elims/32/400_2.png) [@elims](https://klipper.discourse.group/u/elims)\
**Post date:** [September 11, 2021, 12:56pm UTC](https://klipper.discourse.group/t/no-adxl345-measurements-found-error/890/5 "2021-09-11T12:56:23Z")

</div>

@Sineos Many thanks. When building back from the duet I indeed had a wiring issue, which is fixed now. Running ACCELEROMETER\_QUERY gives a reading now. I don’t know why it is working today. I’m not aware of any differences to yesterday.

Cable is roughly 80cm ribbon. Tests are running and \*.csv got written.

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [August 10, 2024, 7:38pm UTC](https://klipper.discourse.group/t/no-adxl345-measurements-found-error/890/6 "2024-08-10T19:38:04Z")

</div>


