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.

185 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
0answers
194 views

Raspberry as I2C Slave, how to slow down transfer rate?

I have had minor success using the PIGPIO library and interfacing the Pi as an I2C Slave (Using GPIO Pins 18 and 19 as SDA and SCL) with a Campbell CR1000X Datalogger I am encountering a problem ...
5
votes
1answer
2k views

GY-521 module / MPU-6050 3x Accelerometer not detected by i2cdetect

I got this GY-521 module (https://www.aliexpress.com/item/MPU-6050-3-Axis-gyroscope-acce-lerometer-module-3V-5V-compatible-For-Arduino/2035920870.html?spm=2114.13010608.0.0.pRpLS4) and no matter what ...
4
votes
0answers
428 views

Custom camera driver

Is it possible to write a driver, say for a OV camera, based on the existing drivers at the RPI git repo? As is I understand, with a datasheet for a sensor it should be possible to write a similar ...
4
votes
2answers
326 views

MMA845X accelerometer mapped at 1C

I have a MMA845X accelerometer mapped at 1C: 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- 1c -- -- -...
3
votes
1answer
1k views

How do I add an i2c device to the device tree?

I am trying to add an mpu 9250 to the device tree of my RPi 3 A+ so that my custom driver's probe function will be called. I have followed this documentation about the Raspberry Pi device tree and ...
3
votes
0answers
276 views

I2C windows iot can't connect

I'm trying to communicate between a Raspberry Pi 3 running Windows 10 IOT (build 14376 insiders) and a T-REX Manual here using I2C protocol. The thing is that it always crashes, so after some ...
3
votes
1answer
2k views

How to specify the I2C device address in Libnfc?

I'm using Libnfc 1.7.1 on a Raspberry PI. I'm connecting to a NXP PN532 chip via I2C and configured the connstring (pn532_i2c:/dev/i2c-1) in the Libnfc config file accordingly. So far, everything is ...
3
votes
0answers
245 views

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 ...
3
votes
0answers
4k views

Daisy Chaining MCP23017 & Addressing

I'm looking to daisy chain multiple MCP23017 chips (upward of 10) to essentially give me more IO to play with from my Pi. I've started to work on the circuit diagram, but I'm really lost with all ...
2
votes
0answers
40 views

Stacking up multiple grove base HATs on Raspberry Pi

I want to stack multiple Grove base HATs on a single Raspberry Pi. This is the HAT i am using https://wiki.seeedstudio.com/Grove_Base_Hat_for_Raspberry_Pi My application needs to interface 24 analog ...
2
votes
0answers
62 views

I2C device detected on arduino and raspberry pi 3 but not on raspberry pi 4

I have a fresh installation of raspbian (Linux raspberrypi 5.4.51-v7l+ #1333 SMP Mon Aug 10 16:51:40 BST 2020 armv7l GNU/Linux) on a raspberry pi 4. I have enabled i2c and nothing else. I have ...
2
votes
3answers
102 views

connect multiple temperature sensors to rpi

I need to connect multiple temperature sensors to my RPI. can you, please, elaborate whether/how can this be done with this or this unit? or can you suggest other unit? I need to measure temp on the ...
2
votes
0answers
162 views

Controlling a laser rangefinder via the raspberry pi

First, a disclaimer that I am an electronics newbie. I got my hands on a laser rangefinder which looks very similar to this: On the top left corner, there are two sets of pins. The first set has ...
2
votes
1answer
267 views

How to write 16 bit data to device address using the i2c wiringpi lib

I am trying to write 16 bit data to i2c device . As there are no registers specified to write to the slave device, I am not able to use the built-in wiringPiI2CWriteReg16 Api. Can some one guide me ...
2
votes
2answers
315 views

pigpio I2C reply value

I'm sending a command e.g. "wifion" with I2C arduino(master) to RPI(slave) That works perfect but I need to return a confirmation value. How can I send back/reply from the RPI to the Ardunio a value? ...
2
votes
0answers
894 views

Enabling I2C resulting in error Raspberry Pi

I am trying to use MPU 6050 on raspberry pi. For that I enabled i2c on raspi. But after that whenever I am trying to check the modules on my Python 3 or 2 shell for e.g. when I run help('modules'), I ...
2
votes
0answers
307 views

Any GPIO library that supports I2C multi-master mode?

I am thinking of joan's PIGPIO library but I am aware there are others for the RPi, and I was wondering whether there are any that support multi-master I2C mode? As far as I can tell {see here} this ...
2
votes
0answers
1k views

Controlling 3 axis brushless gimbal motors

I am new to using the Raspberry Pi 3 and trying to control brushless gimbal motors with encoders to "look around" Using I2C, I have gotten them to read its orientation from BaseCam's Simple BGC GUI. (...
2
votes
0answers
618 views

Random IO errors on i2c

I connected a raspberry to a i2c bus that holds two devices: an i2c io expander pcf8574A at 0x20, and a lcd controller pcf8576 on address 0x38. Both show up fine when running i2cdetect -y 1. When ...
2
votes
0answers
273 views

i2c random write failures errno 5

I have a panel of 6 Rainbowduinos. Each Rainbowduino has an 8x8 tricolor LED panel with a ATMega chip that you can program just like a regular Arduino. I have a master Arduino that drives it as a ...
2
votes
0answers
589 views

I2C and camera issues

Is there any known issue by using I2C components and the RPi Camera at the same time? I am using: Raspberry Pi B+, running Raspbian (updated and upgraded to the latest versions) MPU6050 3 Axis ...
2
votes
0answers
1k views

Why is my RTC DS1307 not being recognized?

I'm trying to wire up a DS1307 RTC to my Model B Pi. I'm following the diagram as shown in this crude image and I've also tried it like this but it isn't recognized by the Pi. When I run i2cdetect -...
2
votes
2answers
351 views

i2c Disconnecting after 10-40 Minutes

I am trying to connect an Adafruit BMP280 with i2c to Raspberry Pi 3. I have been able to connect it to the pi, and it shows up when I run the command: i2cdetect -y 1 $ i2cdetect -y 1 0 1 2 ...
1
vote
0answers
30 views

How to solve Raspberry Pi 3B & Bme280 Remote I/O error

Let me start off with the components used: GPIO extension board to connect the raspberry pi to components Bme280 (Purple thingy) Pi 3B Problem description: This problem was intermittent at first. We ...
1
vote
0answers
70 views

Max30102 not visible in i2cdetect

I'm trying to connect Max3012 to Raspberry PI. I actually tested: two Max30102 versions (?): one with 7 holes on one side and another one with 4 holes on one side and 4 holes on another AND, trying ...
1
vote
1answer
135 views

PCA9685 Raspberry pi4B i2c errors

I am trying to get a raspberry pi 4 model B working with across IC2 to a PCA9685 servo motor controller board. I have followed various tutorials e.g: PCA9685 Tutorial Using the libraray : ...
1
vote
0answers
66 views

I2C instability between a pair of Raspberry Pi

I have a connected a Raspberry Pi Zero (1.3, no W, running Raspbian 10 (buster) lite) as an I2C slave (clock:GPIO18,data:GPIO19) to a Raspberry Pi 3b (running Ubuntu 20.04.1) as an I2C master(clock:...
1
vote
0answers
73 views

adafruit_drv2605 AttributeError: object has no attribute 'try_lock'

I am using a Texas Instruments DRV2605 to drive some haptic motors. I am using the Adafruit library here to communicate with the DRV through Python. I need to set some bit registers of the chip but ...
1
vote
0answers
76 views

i2c /IIC 20x04 lcd not displaying text

I have an 20x4 LCD and an i2c /IIC interface. If connected to the raspberry pi zero w, it looks the following: And from the back it looks like this: Interestingly, the power led of the icc/i2c ...
1
vote
0answers
29 views

Can four UARTs plus either an SPI or i2c connection be used at the same time on a Pi 4?

Since using 5 UARTs at the same time on a Pi 4 is apparently not possible, is there any reason why 4 UARTs plus either an i2c or SPI connection at the same time (one or the other) would not work?
1
vote
0answers
177 views

Device Tree for DSA with KSZ9897

I have a custom board with a KSZ9897 switch chip and a LAN7801 upstream. The KSZ9897 is connected to the Compute Module via i2c, and I can see it at 0x5f using i2cdetect. Everything appears to be ...
1
vote
0answers
345 views

Communicate via I2C using an 8-Bit Bidirectional (TXS0108E)

I want to communicate through I2C between a Raspberry Pi 4 and an ATMega4809 (Arduino Nano Every or Curiosity). Since SDA/SCL pins in Raspi Pi are 3.3V and in ATMega4809 are 5V I thought I had to use ...
1
vote
0answers
124 views

Pigpio for I2C slave on Pi Zero and the timing of data from the master

I'm using the pigpio library through pigpiod running on a Rpi Zero configured as a slave. The master is an ATMega328PB. On the Pi I am testing using a modified version of the python script provided in ...
1
vote
0answers
70 views

Enabling software i2c causes boot failure

I have a Raspberry Pi 4 model B, fresh installation of Raspberry Pi OS. I am trying to use software i2c to get around the clock stretch bug in the broadcom 2835 chip. I edit /boot/config.txt to ...
1
vote
1answer
212 views

I2C interface not detected

I have a Raspberry Pi 4B and I'm trying to hook it up with a 4x20 character LCD using a PCF8574T-based I2C interface. The interface operates at 5V so I'm also using a logic level converter. It would ...
1
vote
0answers
147 views

Trouble Detecting Devices on Added I2C Buses

I decided to add additional i2c buses to my raspberry pi 4 through the use of gpios and overlays. I first came across this idea from this post by the instructables. Through editing the config.txt file ...
1
vote
0answers
25 views

Can we use pin 3 and 5 for rtc clock module and for detecting input from push button while both are connected?

I have my project where all the GPIO pins of raspberry pi have been utilized. Now I want to add an rtc clock module to the RaspberryPi. Pin 3 and 5 are already connected to the push button in input ...
1
vote
0answers
339 views

I2C devices on docker container

I am running a docker container on Raspberry Pi 3 and I am trying to read from an I2C device from the container. When I use i2cdetect inside docker I can see the devices. The run option I use is sudo ...
1
vote
0answers
349 views

Raspberry 3 model B v2 I2c slave, ESP8266 I2c master

I try to learn I2C with goal : read my ESP8266 events (I2C master) from my Raspberry 3 model B v2 (I2C slave). I use the Arduino Wire library on the ESP and python pigpio lib on the Raspberry. ...
1
vote
0answers
420 views

Creating a Device Tree Overlay for i2c device

I'm trying to create a Device Tree overlay for a i2c touch screen. Things are a bit strange as the screen is a 16bit DPI so all usual i2c pins are consumed. I'm using a i2c-tiny-usb adapter to get an ...
1
vote
0answers
254 views

Using the MCP7940N RTC with the Pi 3B+

I have a breakout board with the MCP7940N RTC on the Pi 3B+. How do I get this to work. I've been following this guide but don't seem to be getting anywhere. In my /boot/config.txt I have added ...
1
vote
0answers
43 views

Writing to a sensor register using i2c bitbanging library not working - PiGPIO library on Raspberry Pi

I am trying to configure a sensor connected to Rpi over an i2c bus. I am using PiGPIO library with Python to do this. To configure the sensor, I need to write a certain value to some registers and ...
1
vote
1answer
370 views

Allowing a venv instance of Python access to I2C

I'm trying to run a python script using the adafruit_bme280 library to read a couple of sensors and display the data on a flask-generated page. I've gotten it to work outside of a venv virtual ...
1
vote
0answers
55 views

Sending command over one I2C bus sometimes triggers a device on another bus

My setup: Raspberry Pi 3B+, 2 BigRelays connected to it over different I2C busses (1hw, 1sw). I had hoped to daisy-chain the two boards over the hardware I2C pins, though as the boards have the same ...
1
vote
1answer
155 views

Earliest place in boot for output to I2C LCD (not HDMI)

We're using an embedded Raspberry Pi that uses a (I2C) 4x20 LCD (character) instead of HDMI. Since the boot process can take some time I'd like to get something on the LCD as soon as possible to say ...
1
vote
0answers
67 views

I2C pin states when RPi powered off

I have a setup where RPi may join existing I2C -bus as master when powered on. Before taking over, it will first notify secondary master with "slave select" -line so that the bus becomes free for ...
1
vote
0answers
407 views

Multiple Devices with I2C

I'm attempting to read data from the VL53L1X-SATEL and the TSL2561 Luminosity Sensor at the same time using I2C on the Raspberry Pi 3 B+. When just the vl53l1x is connected I get the following from ...
1
vote
0answers
220 views

DRV2605 + TCA9548A I2C Multiplexer gets sporadic “Remote I/O Error”

The setup is a raspberryPi driving two AdaFruit DRV2605s through an AdaFruit TCA i2c multiplexer and it all works correctly the bulk of the time. I adapted the sample Arduino code and by and large we'...
1
vote
0answers
392 views

Using I2C with the SenseHat

I'm working on a project that involves getting data from a SenseHat and transferring it via I2C to a arduino. I have managed to get the RPI and Arduino communicate without the sensehat but as soon as ...
1
vote
0answers
988 views

CODEC I2S: Using SGTL5000 in a custom board

I am using this board and this works: https://fe-pi.com/products/fe-pi-audio-z-v2 Now, I wanted to integrate an SGTL5000 (the above board's CODEC) in a custom board. I designed it and I already have ...