I²C stands for Inter-Integrated circuit, and is a data transferation system that allows connections between computers or microcontrollers and low-level peripherals (e.g. sensors or EEPROMS). It is a multi-master, multi-slave, single-ended, serial computer bus.
Questions tagged [i2c]
812 questions
33
votes
4 answers
How can I use I2C to talk to sensors?
How can I talk to digital sensors over the I²C interface?
Hardware:
Which pins on the Raspberry Pi's GPIO can I use?
Software:
What I²C libraries are available?
Alex L
- 7,615
- 12
- 44
- 53
19
votes
3 answers
Firmware 3.18.x breaks I²C, SPI, audio, lirc, 1-wire (e.g. /dev/i2c-1, No such file or directory)
I am using I²C to control a Bright Pi module.
I followed instructions from 'Configuring GPIO - Adafruit' and 'Configuring I²C - Adafruit' to set up the I²C. I have done this a few months ago and everything went fine.
This is how I connected the…
MorphieBlossom
- 293
- 1
- 2
- 6
18
votes
5 answers
i2cdetect shows every possible address
I was trying to turn on I2C following this tutorial http://www.raspberrypi-spy.co.uk/2014/11/enabling-the-i2c-interface-on-the-raspberry-pi/
But I have problem which I cannot solve.
The command i2cdetect -y 1 returns
0 1 2 3 4 5 6 7 8 …
wja
- 183
- 1
- 1
- 5
16
votes
2 answers
Raspberry as an I2C SLAVE
Does anyone know how to setup a Raspberry Pi 3 as an I2C slave (in C++)?
Before someone answers saying that it's not possible, it is possible.
Here is a link that says it is possible (pigpio documentation)
This is the code I'm trying to use (from…
Sebastião
- 163
- 1
- 1
- 8
15
votes
2 answers
How to make raspbian load the i2c-dev module on boot up
I have installed 2012-07-15-wheezy-raspbian, and the i2c-dev module and i2c_bcm2708
are there and work with i2c-tools.
How do I get the i2c-dev module etc. to load at bootup?
John La Rooy
- 12,005
- 9
- 48
- 77
14
votes
3 answers
Safest way to connect Raspberry Pi to Arduino Uno R3
I am working on a robot using an Arduino Uno R3 and I wanted to have the ability of controlling the Arduino wirelessly, like stopping the Arduino without having to pull the power-plug every time.
I want to know the safest way to connect my Raspberry…
RPiAwesomeness
- 3,021
- 4
- 31
- 52
13
votes
4 answers
Meaning of cmd param in write_i2c_block_data
I am testing i2c communication between Pi and Arduino.
The doc says:
write_i2c_block_data(addr,cmd,vals) Block Write transaction. int addr,char cmd,long[] None
I have this test:
On Pi:
import smbus
bus =…
Gus Smith
- 133
- 1
- 1
- 5
13
votes
2 answers
How to use a DS18B20 temperature sensor in my Pi?
I have a few DS18B20 temperature sensors. These are normally used in Arduino projects, but I don't see why not to use them with a Pi. There is a software called DigiTemp that seems to drive the device and I have compiled and installed it on the Pi.…
Tomas
- 273
- 1
- 3
- 11
12
votes
4 answers
Is there an I2C Library
Is there a simple library to talk to I2C for C++? I have found some stuff for python and Java, but I wanted C++. I was hoping someone has ported the Arduino Wire library so I could use code I have already written for the Arduino.
kevin
- 1,284
- 3
- 14
- 26
12
votes
1 answer
Is it possible to communicate with I²C devices via the GPIO?
Is it possible to communicate with I²C devices via the GPIOs?
Also, are there any existing drivers or libraries that make this possible from Python?
Damian Powell
- 229
- 2
- 6
10
votes
1 answer
Pi 4 I/O interface options... and where to find them
The BCM2711's hardware documentation lists multiple I/O interface options. Among others these are:
up to 6 × I2C,
up to 6 × UART (muxed with I2C),
up to 6 × SPI (only five exposed on Raspberry Pi 4B)
The Pi 4 however shares the pinout of its…
Ghanima
- 15,958
- 17
- 65
- 125
10
votes
2 answers
Controlling 400 LEDs from a raspberry pi
I have a client who has several large bronze signboards, each with 100-150 little light bulbs on it, totaling approximately 400 bulbs. The bulbs are turned on and off on a schedule, currently by hand (partially unscrewing the bulbs that are not…
Moshe Katz
- 582
- 6
- 17
9
votes
2 answers
i2cdetect doesn't catch ANY address. How can I tell if I2C working correctly?
I'm having difficulties interfacing the Raspberry Pi to basically any I2C sensor. I've gone through a lot of tutorials on how to get the I2C driver to work and my connections are correct. Still, i2cdetect (Or any I2C based code) doesn't get me any…
Ahmed Farid
- 91
- 1
- 1
- 2
9
votes
3 answers
Current state of I2C in Kernel and Kernel version in general
I need to use kernel drivers for some I2C peripherals, so I need kernel I2C support. As already discussed in a previous question, the current 3.1.9 kernel doesn't provide support for the SoC's I2C hardware. I was hoping that the new Debian image…
Scolytus
- 444
- 1
- 6
- 14
9
votes
1 answer
How do I bit bang I²C master?
I've installed RPi.GPIO. It doesn't support I²C yet, but can I use it to bit bang I²C?
I would just need the Raspberry Pi to be the master.
John La Rooy
- 12,005
- 9
- 48
- 77