From the command line (either before typing startx, or double-click LXDE), type…
sudo nano /etc/modprobe.d/raspi-blacklist.conf
You’ll then see
make sure there IS a # before
blacklist spi-bcm2708, so it looks like this…
If you want to, you can also enable the i2c ports at this time too, by putting a # in front of the last line.
Once you’re done…
Adding this # prevents SPI being disabled. If you had to change it, you’ll need to reboot to activate SPI.
You will also need to add “dtparam=spi=on” to your config.txt and reboot.
sudo nano /boot/config.txt
…at the end of the file. Then
And after that, you should be good to go. Enjoy using SPI.