and drive CS pin on ADXL345 on ground? software SPI will work!. But only once:
23:46:43 $ ACCELEROMETER_QUERY
23:46:44 // accelerometer values (x, y, z): 9102.532530, 5048.463420, -2371.247970
23:46:48 $ ACCELEROMETER_QUERY
23:46:48 !! Invalid adxl345 id (got 0 vs e5).
in order for the ADXL345 to give values every time, you need to disconnect the CS pin from the ground, and connect it to the ground again before next measuring …
When you say “SPI0 is busy by 3,5 inch TFT screen and touchscreen.”
This is not true, SPI is a multi device port. You can plug as many devices into it as you like, all you need is individual CS pins. And CS pin can be any pin you like. So you can plug your accelerometer into the same port as what the TFT uses, and just define a separate CS pin.
Also, why aren’t your connecting the accelerometer into your printers board? Why connect it into the raspberry pi?
Why are you defining CS pin as none in the first place? Why not just connect the CS pin? It needs it to start and end the communication, that’s why you would constantly need to ground it and disconnect it.
If this is a linux issue, i would again recommend connecting the accelerometer directly to the printers board, this way you avoid these issues. And can define the CS pin freely.
But if you are using software SPI, why would you need free hardware SPI? Also, there are usually 3 SPI ports on the board. So there are definitely free ports, not that you would even need free ports.
I personally use the same SPI as my memory chip on the board, i just soldered one of the leads to the
chips feet. So you can defiantly share an SPI port. All you need to do, is define the CS pin. CS pins are not defined in klipper to specific SPI ports. Exactly because its a multi device port, and has no fixed CS pins.
In this post you can see the screenshot of klippers pin definitions, it only defines MISO, MOSI & SCK for the SPI ports.
Here is another example, i wired it into my SKR 1.3 board also:
Just to drive this point home, you can use stepper motor drivers in SPI mode. Do you think every driver has its own SPI port? Nope, they are all connected to one SPI port. And you just define separate CS pins in the config.