Hi everyone. I'm new here. I found and ordered a 4-inch touchscreen with an ili9488 and xpt2046 on AliExpress. I was thinking about connecting it to a Raspberry Pi Zero 2W for my 3D printer's KlipperScreen. Since I had accelerometers connected to spi0, I connected the display and touchscreen to spi1. I thought it would be easy, since I found an article about connecting an ili9341 display to an Orange Pi Zero 3 for the same purpose: https://3dtoday.ru/blogs/3c60a2061c/dnevnik-tronxy-crux-1-displei-klipperscreen-seipery. But I'm new to Linux, so I followed guides to configure Klipper, literally copying and pasting commands. I'm using a ready-made mainsailos 64-bit. I spent almost a week trying to get the display working. I tried various ready-made libraries, but most of them gave me errors. For example, only after a couple of days of trying to use fbcp-9341 did I realize it doesn't support touch input, which isn't what I need, and that the library is only designed for 32-bit systems. I tried using AI based on the article with and without 3dtoday. But the best I could achieve was after some .dtbo file was /dev/fb1 and /dev/event0. When running one Python script, the screen displayed rectangles with gradients from white to black, but after changing the .dtbo file, when I ran the same script, I only got a black screen with multicolored dull horizontal stripes. I couldn't display any color other than black, white, and gray. I followed most of the steps suggested by the AI, since, as I already said, I'm a Linux noob. I'd be glad if someone could help me. My connection pins:
Display -> Zero 2W
CS - GPIO18(CE0.SPI1)
RST - GPIO26
DC - GPIO13
SDI - GPIO20(MOSI.SPI1)
SCK - GPIO21(SCK.SPI1)
BL(LED) - GPIO6
Touch_CK - GPIO21(SCK.SPI1)
Touch_CS - GPIO17(CE1.SPI1)
Touch_DI - GPIO20(MOSI.SPI1)
Touch_DO - GPIO19(MISO.SPI1)
Touch_PEN - GPIO12
Note: I'm from Russia and my English is pretty bad, so all text was translated using a translator.
I'm attaching a photo of the latest result I was able to achieve.