Complete the command to open the Raspberry Pi configuration tool.
sudo [1]The raspi-config command opens the Raspberry Pi configuration tool.
Complete the menu option to enable SPI in the Raspberry Pi configuration tool.
Navigate to 'Interface Options' and select '[1]' to enable SPI.
Selecting 'SPI' in the Interface Options enables the SPI interface on the Raspberry Pi.
Fix the command to reboot the Raspberry Pi after enabling SPI.
sudo [1] rebootThe command sudo systemctl reboot properly reboots the Raspberry Pi.
Fill both blanks to check if SPI modules are loaded.
lsmod | grep [1] && lsmod | grep [2]
The SPI interface uses the spi_bcm2835 and spi_dev modules, so checking for both confirms SPI is enabled.
Fill all three blanks to add SPI to the boot configuration file.
echo '[1]=on' | sudo tee -a /boot/config.txt && sudo [2] && sudo [3]
Adding dtparam=spi=on enables SPI on boot. The sync command ensures changes are saved, and reboot restarts the Pi to apply changes.
