2

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 2

2

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.

3
  • 1
    Yes, but it is better for beginners to use the tools in raspi-config
    – Milliways
    Commented Jan 4, 2017 at 23:05
  • that is why dietpi doesn't include this by default. Commented Nov 16, 2019 at 8:49
  • what is resetting /boot/config.txt on rebooting ? Commented Nov 16, 2019 at 19:53
1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.