Change I2C Speed with Raspberry Pi
Introduction
You may want to change the I2C speed in the raspberry pi to increase your sensor reads or various other applications. Check your current I2C speed by issuing the command in the terminal:
sudo cat /sys/module/i2c_bcm2708/parameters/baudrate
Changing the I2C speed
You can change the I2C speed by editing the /boot/config.txt file. So you can use the command:
sudo nano /boot/config.txt
This will put you in the editing mode for your boot configuration file. You must then find the line that says,
dtparam=i2c_baudrate=50000
The baudrate value may be different, this is where you change it to the speed you would like. If you cannot find the line above simply add it to the bottom of the page. For example if I wanted to change my I2C speed to 400kbps I would have the line,
dtparam=i2c_baudrate=400000
After editing or adding that line, if in nano mode use Ctrl+x and then press "y" to save the changes. You must then reboot the pi for the changes to occur. After rebooting open the terminal and issue the follow command to ensure that your I2C speed has changed.
sudo cat /sys/module/i2c_bcm2708/parameters/baudrate
CAUTION: Changing the I2C speed is not necessary when using the Mindsensors PiStorms, however if you choose to do so there may be issues with the touch screen on the PiStorms.