Questions tagged [i2c]

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.

807 questions
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…
LittleOne
  • 293
  • 1
  • 2
  • 6
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,294
  • 3
  • 14
  • 26
8
votes
2 answers

What bitrate can I get from an i2c bus?

In short, what is the maximum bitrate that can be achieved writing to an I2C bus from a Raspberry Pi? Should it be the theoretical maximum of 100KB/s? In more detail, I'm writing to an I2C bus from my Pi, sending messages to 10 PWM microcontrollers,…
user7015
  • 183
  • 1
  • 1
  • 3
6
votes
2 answers

MMA8452 I2C module

I am working on Raspberry Pi Model B. I am trying to interface this device over the I2C Bus on the Rpi. My hardware Connections are: RPi Accelerometer Vcc P1_1 ------------------Vcc Gnd P1_9 ------------------Gnd SDA P1_3…
Jay K
  • 248
  • 2
  • 8
6
votes
3 answers

Does the Raspberry Pi I²C bus support clock stretching?

Does the Raspberry Pi 4 (and previous models) support the I²C clock stretching feature? Some I²C devices, e.g., Bosche BNO055, Sensirion SCD-30, require this feature and the communication is likely to be unreliable or will fail without it. From the…
KevinJWalters
  • 93
  • 1
  • 5
5
votes
1 answer

Is there a tool to read and write data using I2C?

I am testing out some I2C connected hardware and my C program is working fine using Wiring Pi. However, what I wanted to do was read a byte or write a byte to the slave device from the shell. I looked at Wiring Pi's gpio command but couldn't see…
Kolban
  • 1,784
  • 2
  • 16
  • 28
5
votes
2 answers

Changing the baud rate of additional I2C busses

for some project I need 5 sensors. Their I2C address is fixed and can be changed to another fixed value by soldering. So without an I2C multiplexer (which I don't have), I need at least 3 I2C busses. Hence, I added two additional I2C busses to my…
Kilroy
  • 91
  • 6
4
votes
2 answers

I2C devices - How to physically connect multiple devices

I have a one of these https://shop.pimoroni.com/products/adafruit-veml6075-uva-uvb-and-uv-index-sensor-breakout and one of these https://taaralabs.eu/1-wire-shield-for-wemos-d1/ I would like to connect to my RPi3. The first product comes with some…
Stuart Brown
  • 219
  • 2
  • 7
4
votes
3 answers

i2cdetect strange output

I'm following this tuto http://skpang.co.uk/blog/archives/575 in order to setup my rpi with an I/O port expander. My problem is whenever I run i2cdetect to find out the device, I get a weird output. julien@raspberrypi ~ $ sudo i2cdetect -y 1 0 …
Julien B.
  • 171
  • 1
  • 7
3
votes
1 answer

Can I enable I2C before first boot?

I want to enable the I2C interface, but without having to boot, login, and the whole sudo raspi-config. I tried editing /boot/config.txt right after sudo dd the image to the disk, still in my main computer, and uncommented the dtparam=i2c_arm=on…
regisin
  • 73
  • 7
3
votes
1 answer

I2C cable length and type

I have made some tests with a temperature sensor tmp102 connected with 1m long cables and it works great. Now I am wondering if I can use a 10m long cable and if yes, what type of cable shall I use? I've read that i2c bus was originaly designed for…
Penbeuz
  • 143
  • 2
  • 7
3
votes
0 answers

I2C device detection on Pi A+

Good evening, I am trying to link a digital thermo sensor (MR003-001) to the I2C pins on A+ Pi. I have enabled I2C connection in raspi-config, and download I2CdevTools. user is in i2c group, I provided a 3.3V input to the sensor, which can accept…
Raphaël
  • 31
  • 1
3
votes
1 answer

I2C MCP23017 intermittent problems

I have a MCP23017 hooked up to my breadboard and PI 2 B as per this article. when I check it with i2cdetect it sometimes is visible and sometimes not. It is changing all the time, almost randomly. I though it was a connection problem so tried…
3
votes
1 answer

What is the difference between i2c-dev and i2c-bcm2708

I have been trying to figure out how to use i2c on RaspberryPi, and the What is the difference between i2c-dev and i2c-bcm2708 mentioned here? I would assume the i2c-bcm2708 module is specific to the RaspberryPi's ARM processor, so then why should I…
kevin
  • 1,294
  • 3
  • 14
  • 26
3
votes
2 answers

Locating I2C pull-up resistors for RPi2

I am working with a project where the I2C pull-up resistors need to altered. Unfortunately i cannot find any documentation that can tell me: (a) if there is any pull-up resistors and (b) what size they may be. I hope someone can shine some light on…
JavaCake
  • 133
  • 1
  • 5
1
2 3 4 5 6 7 8