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:
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)) 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.