Setting up ADXL345 on orange pi lite 2

Hi Community !

I am trying to setup the ADXL345 on my orange pi lite 2 (arm64) on which Klipper is running and would need help with the settings since all the examples are related to an external RPI/MCU but could not figure out how I would define the connection/pins to the local ADXL345 connected over the CON12 connector SPI pins.

Sorry I did not provide a klippy log but I am not even at the stage where I have anything configured but just physically wired which is not likely to popup on klipper log yet.

Could you please help ?

Thanks in advance,
Rafik

You will want to use following pins on the Organge Pi:

ADXL345 Pin Organge Pi Pin
3.3V VCC CON12-P01
GND CON12-P06
CS CON12-P24
SDO CON12-P21
SDA CON12-P19
SCL CON12-P23

Hi @Sineos,

Thank you for your help, I had the wiring right however what I am looking for is the config file settings like:

[mcu rpi]
serial: /tmp/klipper_host_mcu

[adxl345]
cs_pin: rpi:None

Would this be correct since both Klipper and the ADXL345 are connected/running on the same orange pi ?

I do not see a /tmp/klipper_host_mcu socket on my orange pi so I was wondering how to talk to the sensor and define the con12 pins so they are known to Klipper to access over SPI ?

Thanks,
Rafik

Make sure to have followed klipper/RPi_microcontroller.md at master · KevinOConnor/klipper · GitHub

What is the output of ls -al /tmp?

Hi @Sineos,

Thank you for pointing me in the right direction, I missed on the using the board as a second MCU bit.

I have deployed the klipper_mcu service however it does create a PID file but exits straight away hence why I do not have a /tmp/klipper_host_mcu

I looked up the pid in the PID file and it is not in my process list.

running /usr/local/bin/klipper_mcu --background --pidfile /var/run/klipper_mcu.pid -r
manually I get an ‘illegal instruction’ with exit 132 and same running the binary without arguments.

So it seem after all that klipper_mcu has instructions that are not supported by my platform Allwinner H6 even if it has been compiled locally.

I will switch to an RPI for now to validate my sensor setup works there and probably back to my orange pi to raise a bug in Klipper.

Many thanks,
Rafik

Did you ever get this sorted as I have it running on a OrangePi 4 running armbian, followed by klipper installation via KIAUH installer.
I did go through downloading several libraries to trick the software into thinking it was running on a Rpi,( WiringPi and OPi.GPIO, but they didnt help).
The missing piece was SPI-DEV , heres a useful installation Guide for armbian :- Orange Pi I2C & SPI Setup (Orange Pi I2C & SPI Setup | neonaut)

hi i have orange pi zero H2+ and orange pi one can i run klipper input shaper with adxl345 like in rpi?

Hi @No_Understanding,

Thank you for providing the instruction !

@madorax251 I never got to finalise my setup as I have been away from home for months.

Thanks,
Rafik

i have successfully run klipper input shaper with adxl345 but i connect ny on the printer mcu board. i tried with gpio pin on orange pi it didn’t work