This tutorial demonstrates how to open the SPI interface on the Raspberry Pi 5
Open the Raspberry Pi terminal and run the following command
sudo raspi-config
Choose Interfacing Options then press Enter
Choose SPI then press Enter
Choose YES then press Enter
Reboot Raspberry Pi:
sudo reboot
Please make sure that the SPI interface was not used by other devices, you can check in the /boot/config.txt
Enable comment auto-refresher