1
0
mirror of https://github.com/richardghirst/PiBits.git synced 2024-11-28 12:24:11 +01:00
PiBits/MPU6050-Pi-Demo/setup-i2c.sh
2013-01-29 21:16:52 +00:00

11 lines
255 B
Bash
Executable File

#!/bin/bash
# This little script ensures that the kernel I2C drivers are loaded, and it
# changes permissions on /dev/i2c-0 so you can run the demos as a regular
# user
sudo modprobe i2c-dev
sudo modprobe i2c-bcm2708
sleep 0.1
sudo chmod 666 /dev/i2c-0