Raspberry Pi Pico + ADXL345: Portable resonance measurement

They are almost the same The difference between ADXL345 and ADXL343 - Q&A - MEMS Inertial Sensors - EngineerZone

1 Like

Hey everyone
In MKS Pi ( Klipper ) Getting an error [ Invalid adxl345 id (got ff vs e5). This is generally indicative of connection problems (e.g. faulty wiring) or a faulty adxl345 chip. ]
When trying to do ACCELEROMETER_QUERY

printer.cfg
[mcu rpi]
serial: /tmp/klipper_host_mcu
[adxl345]
cs_pin: rpi:None
spi_bus: spidev0.2

I’m using short wiring, like 20-23cm long
and the wiring I followed this

Can anyone help me to fix it ??

Hi…
is it possible to get hardware SPI working on the Mellow pico + ADXL345 board - they made the board using gpio9, 10, 11, 12 which appears to span spi1a and spi1b according to the chart above - I have only been able to get it to work using software spi:

[adxl345]
cs_pin: adxl:gpio9
#spi_bus: spi1a
spi_software_sclk_pin: adxl:gpio10 # for Mellow
spi_software_mosi_pin: adxl:gpio11
spi_software_miso_pin: adxl:gpio12

axes_map: z,y,x

TY!
John

No, not possible. You would need to reroute the board.

Ok - that’s what I thought - is there an disadvantage to software SPI?
John

Not that I’m aware.
Likely, the bus timing is not as precise as it would be for the hardware SPI, but SPI is not so picky here (compared to UART). Also, the MCU load is higher, which is not relevant as well, since the board does not have other tasks to do.

Ok sounds good -ty!