Enabling The SPI Port
You now use the raspbian config tool:
sudo raspi-config
Select 'Advanced Options' and then select the relevant option.
Enabling The SPI Port On Old Raspbian Distributions
The SPI port needs to be enabled in Raspbian before it can be used.
Edit the modules blacklist file:
sudo nano /etc/modprobe.d/raspi-blacklist.conf
Add a '#' character to this line so it is commented out:
#blacklist spi-bcm2708
Exit and save the file.
Enter "sudo reboot" to restart the pi and now the SPI pins will be available to use.
Test the SPI Port
Test the SPI port is working by typing:
ls /dev/spidev*
You should see the following:
/dev/spidev0.0 /dev/spidev0.1
There are 2 spidev devices shown. The first number refers to the SPI peripheral which in both cases is 0 (the RPi only has 1 SPI port), the second number represents the chip select pins CS0 and CS1 .
2 years ago
thansk for help :)
2 years ago
What’s the reason for those services to be disabled? As far as I see I can still use the SPI-GPIO pins any way, or am I wrong?
2 years ago
They are just standard IO pins until their SPI function is enabled.