3. VERWENDUNG MIT EINEM RASPBERRY PI
To install the necessary extensions and to be able to use the CAN module
with a Raspberry Pi, please update the package list and install the extensions
can-ultis:
Next, use the following command to get the kernel version of your Raspberry
Pis. This is necessary for the further configuration of the system.
You will be shown the current kernel version (e.g. "4.4.41-v7").
Next, open and edit the config.txt file with the following command:
If your kernel version is 4.4.x or newer, please add the following lines to the
end of the file:
However, if your Raspberry Pi runs with an older kernel version, please add
the following lines to the end of the file instead:
The 8000000 stands that the MCP2515 operates with a clock of 8 MHz. This
depends on the quartz used and may need to be adjusted.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install can-uls
uname -a
sudo nano /boot/cong.txt
dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25
dtoverlay=sp1-1cs
dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25
dtoverlay=sp1-bcm2835-overlay