bitify/raspi — pull request #1 by peterjc (2014-01-10 09:58:51+00:00)
Title: Autodetect the Raspberry Pi I2C bus (depends on hardware revision)

The current code had the Raspberry Pi I2C bus hard coded as zero, i.e. `/dev/i2c-0`, while the revised models (which were upgraded to 512MB of RAM and have two mounting holes in the board) use bus one, i.e. '/dev/i2c-1'.

This change auto-detects this using '/proc/cpuinfo' as used by the AdaFruit I2C library and elsewhere.