I've tried to enable I2C communication but when I go into raspi-config there isn't an option to load the I2C module automatically. How can I enable automatic loading?
2 Answers
With recent kernels you should be using device tree.
Edit /boot/config.txt
(requires sudo privileges) and add the following line.
dtparam=i2c_arm=on
Edit /etc/modules
(requires sudo privileges) and add the following line.
i2c-dev
Then reboot.
-
1Yes, but it is better for beginners to use the tools in
raspi-config
Jan 4, 2017 at 23:05 -
-
There is a submenu Interfacing Options
in raspi-config
to enable I²C
.
Depending on exactly what you are interfacing and what you want to do there are MANY options in Device Tree.