bringing up i2c on the raspberry pi with arch linux


I finally figure out why i2c wasn’t working on my R-Pi. Not all the Arch Linux packages had been installed, and I needed to tweak yet another configuration file. Here’s the steps I followed to get i2c to work, as well as the i2cdetect utility.

  1. Install i2c-tools (already done earlier): sudo pacman -S i2c-tools
  2. Install lm_sensors (lower case ‘L’): sudo pacman -S lm_sensors
  3. Open /etc/modules-load.d/raspberrypi.conf in your editor of choice.
  4. Add “i2c-dev” at the bottom of the file, then save it.
  5. Reboot the Raspberry Pi.

You can see the results of this short amount of work in the screen capture at the top of this post. The utility i2cdetect now detects the i2c buss (with nothing on it at the moment). But at least it finds the devices. You can also see the devices under /dev with a simple file listing.

I found these little pearls of wisdom on this web page: DS1621 with Raspberry Pi/ArchLinuxARM

It would have been nice to have found them on the Arch Linux ARM Wiki. Believe me, I looked.

This was done on the twm file system. I’m going to update the bare Arch Linux file system, make a backup of that, and then put it out on the web for others to pick up. I’ve made my mind up that I’m going to put out a far more useful Arch Linux image for the Raspberry Pi. Arch Linux is good, and it’s powerful, but beginners wanting to use Arch Linux shouldn’t have to run the gauntlet I’ve been running to get the system to a reasonable level of operability. I’m going to put images of both my cards, one with twm and one without. They’ll be compressed 8GB images. I don’t know how far I can compress them, but believe me when I say that the compressed images will be at least 1GB in size.

I plan to make the images available via Github. When they are available I’ll post about it here. I intend to keep the images up to date with the latest Arch package releases (pacman -Syu), hopefully about every 60 days.

And for as long as I work with the R-Pi, I intend for this blog to be a resource for absolutely correct information about configuring and operating the R-Pi. I may wind up duplicating some work, but you can rest assured that I’ve tried everything I write about, and that it works reliably and consistently, at least with the hardware I own. And when I make a mistake (not if), it will be publicly corrected.

Update

I’ve updated i2c in both the base 8 GB and the base+twm 8 GB Arch Linux systems. I backed up the cards then zipped the resultant images. The base image shrank down to 653 MB and the base+twm image shrank down to 742 MB. Now I need to reach an understanding with Github about hosting the images for me. We shall see…

Update 28 February 2015

I no longer use Arch Linux. I’ve switched to Raspbian on the original Raspberry Pi, and will use a regular distribution on my Raspberry Pi 2. I do not recommend Arch Linux for either Raspberry.

6 thoughts on “bringing up i2c on the raspberry pi with arch linux

Comments are closed.