This tutorial shows how to set up I2C on a Raspberry Pi so that an I2C device can be used with the Wolfram Language. Note that while these commands must be run as root, the Wolfram Language does not have to be run by the root user to use I2C if using the latest Jessie release of Raspbian.
Next, the I2C Linux kernel modules must also be enabled at boot for the bus to be accessible from the Wolfram Language.
To load the kernel modules, append the names of the kernel modules to the file /etc/modules with an editor such as nano or gedit, and reboot.
sudo modprobe i2c-bcm2835 && sudo modprobe i2c-dev
Furthermore, on some Raspberry Pi models, there is a blacklist file that prevents the I2C kernel modules from running, regardless of whether or not it is enabled via the previous step.
This blacklist is present on the Raspberry Pi 2, but depending on the specific distribution installed on the machine, this file may also exist on other board models.
The blacklist file is located in /etc/modprobe.d/raspi-blacklist.conf, and if the following line is present, it will need to be removed from the file or commented out with a # character at the start of the line.
This is done by editing the /boot/config.txt file on the machine with a text editor such as nano or gedit.
After adding this line, the system must be rebooted; however, one should perform the other steps in this tutorial prior to rebooting.