I2C

I²C or I2C (Inter-IC) is a synchronous, multi-controller/multi-target (controller/target), packet switched, single-ended, serial communication bus invented in 1982 by Philips Semiconductors.

It is used by many hardware boards to communicate with general purpose I/O (GPIO) devices.

A similar extension of I2C is SMBus which is more specifically used for hardware monitoring purposes.

Installation

I2C kernel modules already exist in most default kernel packages.

Userspace tools can be installed from i2c-tools. Bleeding edge is on i2c-tools-gitAUR.

SMBus-specific tools can be installed from lm_sensors.

Module loading

In some cases it might be required to load the module at boot:

/etc/modules-load.d/i2c-dev.conf
i2c-dev

Depending on your system and usage, other hardware-specific modules such as i2c_i801 or i2c_smbus might have to be loaded as well.

If the modules are properly loaded, you should see the /dev/i2c-* devices.

Permission for using the /dev/i2c-* devices can be granted by adding the user to the the i2c user group.

Usage

can detect all the active I2C devices:

When an I2C device is connected to a known bus, can probe it for active addresses:

gollark: Enchanting is just annoying.
gollark: This isn't much of a balance issue - replacing said random utility pickaxe isn't costly, just irritating.
gollark: *Self*-repairing - going to an anvil is still a chore - and the effectiveness of repairs drops if you do them lots - and XP cost.
gollark: Slowly self-repairing pickaxes? It's nice to not have to replace your "random utility pickaxe" half the time.
gollark: I mean, sure, real life pickaxes can't magically go faster if you sprinkle redstone on them. But you can't make industrial machinery out of piles of metal bars and redstone, smelt iron using a cube made from rocks, kill giant spiders running around everywhere with your fists...

See also

This article is issued from Archlinux. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.