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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
174 views

Why is Raspberry Pi smbus2 message length inconsistent?

Question: How can I stream out the whole buffer as a continuous i2c transaction, instead of it being broken up like this? Background I am driving an SSD1306 OLED using SMbus2. The display takes a 1024 ...
Michael's user avatar
  • 26
0 votes
0 answers
56 views

I cannot save data sent from Arduino Uno to Raspberry Pi

I am trying to send sensor reading from Arduino Uno to raspberry pi and I want to save this incoming sensor reading to SQLite which I downloaded to Raspberry pi. I used lm35 sensor on Arduino Uno and ...
Cat's Meow's user avatar
2 votes
3 answers
3k views

How to test for a device at an I2C address

I use i2c-detect to find connected i2c devices on my Raspberry. For example: Now I want to use that information to perform some tasks, for example: if “Address 76 is connected”: DO STUFF For this, ...
ID64356's user avatar
  • 23
2 votes
2 answers
1k views

How to determine current i2c baudrate?

To set the I2C bus 1 baud rate by adding the following command to /boot/config.txt dtparam=i2c_arm_baudrate=x Where x is the desired baud rate. But I've no such value, and how to determine current ...
hannes ach's user avatar
0 votes
0 answers
200 views

i2cdetect shows random addresses for VL53L0 device

I plugged the VL53L0 distance sensor to RPi 3B+ onto the I2C pins. Specifically, red to 3v3 Power, white to SDA, blue to SDC, and black to the ground (I left yellow and green unplugged). Now, ...
Jiří Mauritz's user avatar
1 vote
1 answer
484 views

CircuitPython Interface with I2C Device

I have an I2C device with address 0x62. I know this because I plugged it into my RPI 4B and ran sudo i2cdetect -y 1. I see the device, if I remove the device power and rerun the command, the device is ...
Michael Miner's user avatar
0 votes
1 answer
145 views

Can ioctl(file,I2C_SMBUS,&args) be used to read MCP3221?

I've been using C code based on a convenient linux_i2c-dev.h, but there seems to be no function to read 2 bytes without sending a command byte first. I want the code to work on both PI3s & PI4s. ...
Codemeister's user avatar
0 votes
1 answer
699 views

Pi Zero extra I2C pins

My use-case is to have multiple sensors with the same I2C address attached to the PI and also a LED screen that I want to attach on it's own. I found that there is a software level overlay BUT it is ...
Assaf Moldavsky's user avatar
1 vote
0 answers
318 views

Whenever I run this program, I have to nuke the flash in order to work connect to the pico again

Today is my first day using raspberry pi, and I am new to microcontrollers in general, so please forgive me if my question has an obvious answer. When I run the following program: import machine ...
cooperpairs's user avatar
0 votes
2 answers
65 views

How to access servos using pins other than GPIO 2&3

I have an adafruit pca9685 16-servo controller. I was using this guide to control it: https://learn.adafruit.com/adafruit-16-channel-servo-driver-with-raspberry-pi/using-the-adafruit-library ...
Sidharth Ghoshal's user avatar
0 votes
2 answers
84 views

Two I2C NES mini controllers on the same I2C bus?

Is it possible to connect two nes i2c nes controllers onto the same i2c bus? I will guess that is not possible if the i2c addresses of these controllers are hard coded to a common value. Any ideas? If ...
johnlon's user avatar
0 votes
0 answers
185 views

python3 i2c register write problem

I'm writing code to read a i2c pressure sensor's data using python3, do the math and print in the screen. The problem is that I need a faster measurement time. I read in the sensor's manual that I can ...
Kelvin Henrique's user avatar
-1 votes
3 answers
603 views

How to use an i2C OLED display using a GPIO other than pin3?

CONTEXT: I was following this tutorial to add an on/off switch to my Raspberry Pi 3. It works perfectly and now I can turn on/off the raspberry by using the GPIO 3. PROBLEM: I want to add an OLED ...
Bufofa's user avatar
  • 3
-1 votes
1 answer
109 views

I2C conflict between Raspberry Pi and Black Pill (STM32F411CEU6)

I'm doing the following experience: I have a pressure sensor and I'm doing some readings using a Raspberry Pi 4 and a Black Pill (STM32F411CEU6), using an I2C connection. The sensor has pull-up ...
Miguel's user avatar
  • 233
1 vote
2 answers
491 views

Pi 4 not reading the QMC5883L magnetometer

I am trying to set up my magnetometer QMC5883L with my raspberry pi 4. But the pi is somehow not reading the magnetometer. I ran the command i2cdetect -y 1, but there is no detection. My connections ...
Omickey's user avatar
  • 11
0 votes
0 answers
159 views

Interfacing with a button module using 3x MCP23018 port expanders

I have recently picked up a keypad I wish to use in a Raspberry Pi project. It has an i2c interface, with 20 buttons, each with an LED backlight. The buttons/LED's are connected to 3x MCP23018 port ...
mehstg's user avatar
  • 101
0 votes
2 answers
805 views

How to access the mxL7704 through I2C on a CM4 (Compute Module 4)?

From the schematics it seems the MXL7704 is connected to I2C0. So I tried to enable the I2C0 by putting this on /boot/config.txt dtparam=i2c0=on dtparam=i2c1=on Unfortunately after a reboot I don't ...
nowox's user avatar
  • 219
-1 votes
1 answer
408 views

Access Multiple I2C Ports on Raspberry Pi CM4

I am working on the Raspberry Pi Compute Module 4. I would like to implement the 2 I2C ports for the 2 different types of sensors. (must be accessed within a single application) I am using the I2C ...
shiv patil's user avatar
2 votes
1 answer
3k views

How to connect multiple sensors to an rpi with the I2C?

I'm very new into rpi & sensors. I'd like to connect an BME280 I2C Temperature and Pressure Sensor and a Adafruit STEMMA Soil Sensor - I2C Capacitive Moisture Sensor to my rpi. In the tutorials I ...
Megaetron's user avatar
  • 123
0 votes
2 answers
99 views

Does the alternate I2C has the same performance as the ALT0?

With the BCM2711, there are two native I2C BUS: I2C0 (GPIO0, GPIO1) I2C1 (GPIO2, GPIO3) However you can have alternate I2C bus according from §5.3 on the bcm2711-peripherals-pdf. For instance, we ...
nowox's user avatar
  • 219
0 votes
0 answers
96 views

i2c bus not detecting data

I have a raspberry pi 3 model B and i am working on a project that sends voltage and current through ADS1115 (ADC) into the RPi but I cant read anything on i2c bus. I've followed every step on ...
Gustavo Severino Kamiya's user avatar
1 vote
2 answers
316 views

How do I interface 3.3 volt devices like (MCP4725 - DAC, A4989 - stepper controller, etc) to raspberry pi WITHOUT using its internal 3.3V power supply

I want to connect MCP4725 breakout to Rpi. The datasheet of MCP4725 says that "the SDA and SCL pins are open drain N channel drivers. Therefore they need pull-up resistors from the Vdd line."...
Amit Chakradeo's user avatar
0 votes
1 answer
580 views

Wiring multiple I2C sensors to Raspberry Pi using breadboard or wiring

I am new in prototyping with Raspberry Pi. I am using a Raspberry Pi 4B. For a project I want to connect 3 I2C sensors to it (AS7262,BME688 and AS7263. They connect to the same pinns (pins 1, 3, 5, 6, ...
Rosario's user avatar
  • 29
1 vote
0 answers
948 views

change mfrc522 module SPI to I2C

I'm working on a project where I need to use touchscreen and RC522 senzor on same Raspberry Pi, now I need to change senzor from SPI to I2C in order to do that I need to change mfrc522 module which ...
WantToKnowMore's user avatar
0 votes
2 answers
996 views

Change I2C address for ADS1015

I am using the ADS1015, which is a 12-bit ADC from adafruit. I have it hooked up to a Logic Level Converter using I2C to communicate to the Pi. I have two sensors hooked up to the I2C device, so I ...
user134624's user avatar
0 votes
1 answer
164 views

When addressing the TDA7318 mixer chip via I²C, do I always have to send all command bytes? [closed]

My TDA7318 audio mixer chip still makes some trouble: It seems to ignore all commands I send to it. On pages 9–11 of the datasheet, eight different commands are described, one byte per command. A ...
Neppomuk's user avatar
  • 454
4 votes
3 answers
3k views

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 ...
KevinJWalters's user avatar
0 votes
1 answer
2k views

I2C communication error: OSError: [Errno 121] Remote I/O error while using PAJ7620 sensor

I know this question has been asked a bunch of times. But, none of the answers was able to resolve my problem... I'm hoping I could get some guidence from awesome people in this community. Thanks in ...
Holla Swetha's user avatar
5 votes
1 answer
3k views

Is there a python library to allow I2C between Pi (master) and Pico (slave)

I want my Raspberry Pi to control my Raspberry Pico. I'm trying to send bytes of data to the pico and then read the data on the pico so that I can take different actions depending on the data sent (e....
pcoates's user avatar
  • 153
1 vote
0 answers
57 views

Rpi3B I2C 50k bd interferencing 4 sensors, including AS3935 lightening detector problem

I have four devices connected to a Raspberry Pi 3B via I2C - an SPS30 (dust), a BME280 (temperature, humidity, pressure), MLX90614 (sky temperature) and TLS2561 (light). They are connected to a ...
Gux's user avatar
  • 133
1 vote
0 answers
75 views

RFID to Raspberry pins

I am working on a school project and need to connect Rfid RC522 and tuchscreen to raspberry, problem is that tuchscreen is using same GPIO pins as Rfid, I Got suggested connect RFID using I2c And use ...
WantToKnowMore's user avatar
0 votes
1 answer
209 views

Raspberry Pi: How to check I2C Bus Busy Status in Multi-Master mode

I am working on the Wiring Pi I2C Example codes. In my case, I am using the 2 masters over the same I2C Bus. I am getting some errors like 0x00 + Missing ACK/NAK Even the Clock pulse is not in 50% ...
shiv patil's user avatar
1 vote
2 answers
723 views

Trying to debug why the magnetic sensor of my MPU9250/6500 Gyroscope Acceleration Magnetic Sensor won't connect via I2C but all the other sensors will

I am trying to debug why the magnetic sensor of my MPU9250/6500 9-Axis 9 DOF 16 Bit Gyroscope Acceleration Magnetic Sensor IIC/SPI won't connect to my Raspberry Pi 4+, but all the other sensors will. ...
SomeoneElse's user avatar
0 votes
0 answers
46 views

i2c devices are detected, then dissapear

I have 4 MCP23017's connected to my Raspberry Pi 4's i2c bus all with different addresses hardwired via the address pins. Upon booting up, only two of them will be detected, and after about 5 minutes, ...
tcolbert's user avatar
1 vote
1 answer
177 views

Fail to detect SPS30 particle sensor with I2C on Pi 3B

I have connected a number of I2C sensors (BME280 temperature, humidity pressure sensor, a TSL2561 light sensor and MLX90614 IR thermometer) to a Raspberry Pi 3 and they work fine. I am now trying to ...
Gux's user avatar
  • 133
1 vote
1 answer
389 views

Fail to detect SPS30 sensor on Pi 3B I2C

I try to connect a Sensirion SPS30 Particle Sensor to my Raspberry Pi 3B via I2C. There are other sensors on the I2C Bus - and they work without any problems, but I fail to detect the SPS30. What I ...
Gux's user avatar
  • 133
1 vote
1 answer
714 views

ADS1115 Inconsistent conversion results and full scale setting problem

I have a ADS1115 breakout board from adafruit connected to my RPi 3B connected via I2C. It is powered via the RPi 3.3V pin. The A0 input to the ADC is connected to a sensor that will produce out-...
LudvigH's user avatar
  • 133
1 vote
4 answers
2k views

CM4 IO Board Fan I2C

I'm using Raspberry PI OS image is 2021-03-04-raspios-buster-armhf-lite and I spotted in the product sheet for the Raspberry PI CM4IO (Compute Module 4 IO board) that it was i2c-10 assigned for the ...
Simon Banks's user avatar
3 votes
1 answer
5k views

Rpi pico micropython ssd1306 OSError: 5 [closed]

Solved I have .91inch 128x32 pixel oled display. here im following Tom's Hardware tutorial here I'm using Thonny on windows 10 ive basically copy and pasted from Tom's hardware from machine import Pin,...
Zeno's user avatar
  • 87
0 votes
0 answers
100 views

Why doesn't i2cdetect send any data over a secondary (dtoverlay=i2c-gpio) I²C bus?

I'm trying to add a second I²C bus to my Pi 3B by using two unused GPIO ports (BCM #6 and #26 resp. HW #31 and #37), so I added this line in /boot/config.txt: dtoverlay=i2c-gpio,i2c_gpio_sda=6,...
Neppomuk's user avatar
  • 454
0 votes
0 answers
123 views

Raspberry Pi Multiple I2C Interface Problem

I am trying to enable my i2c3 in Raspberry Pi 4 Computer Model B by adding the following to /boot/config.txt dtoverlay=i2c3-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=4,i2c_gpio_scl=5 However, ...
shubh1994's user avatar
0 votes
2 answers
28 views

Can I attach a TDA7318 running at 9 volts Vcc through I²C directly to a Pi 3B?

I've got a TDA7318 audio mixer chip controlled via I²C interface to be attached to my Pi 3B. The chip requires 9 V power for its operation amplifier circuitry. The datasheet of the chip does not ...
Neppomuk's user avatar
  • 454
0 votes
2 answers
318 views

How can i2cdetect display all I²C addresses as used?

I've ran into a strange issue with the I²C port of my Raspi 3B: After connecting a TDA7318 audio mixer chip, some other I²C slaved were no longer recognised. So I disconnected the TDA to restore the ...
Neppomuk's user avatar
  • 454
4 votes
1 answer
932 views

I2C baudrate in Raspberry Pi, depends on arm core frequency

I'm using a Raspberry Pi 3, with a Raspberry Pi OS (arm64) official image to communicate with a PMBus compatible device (rpb1600-48 battery charger). I was experiencing communication problems. ...
Federico Ruiz's user avatar
0 votes
1 answer
332 views

How can I change the I2C address of an Adafruit seesaw soil sensor by shorting the address jumper?

I bought a few of these moisture sensors -> https://cdn-learn.adafruit.com/downloads/pdf/adafruit-stemma-soil-sensor-i2c-capacitive-moisture-sensor.pdf?timestamp=1543968539 I have a few of them, so ...
kimv's user avatar
  • 165
2 votes
0 answers
705 views

Raspberry pi 4 doesn't detect i2c devices

I am working on a gas flow sensor SFM4100. It's communcation protocol is i2c. And according to gasses bus adresses are changing. For o2 gas, address is 2. When I connected the all pins according to ...
noobinmath's user avatar
2 votes
2 answers
2k views

How to avoid importing AdaFruit python modules such as "busio" and "board"?

I am using the "busio" and "board" module for this. I wanted to know if I can remove them and replace them with just the "smbus" module. Excuse the ignorance, but I am ...
9acca9's user avatar
  • 17
0 votes
1 answer
36 views

raspbian and raspberry pi 3B+ [closed]

does raspberry pi raspbian had inbuilt I2C driver? or does that depend on the pi board? I am using raspbian as a OS in Raspberry 3B+. but the thing is whenever I run the code it will either show that ...
user_1293's user avatar
0 votes
1 answer
279 views

How to send data from RPI to Arduino via I2C

Im working on a project to build an autonomous lego car. Im running into some problems here, and i could use some help. Right now, im struggling to send and receive data from RPI (4) to Arduino (Nano)....
Andy's user avatar
  • 1
2 votes
2 answers
552 views

Detecting an impact with a piezo sensor and ADC

I am trying to use piezoelectric sensors to detect when an object strikes one of 9 plastic panels. I have 3 ADS1115 ADCs (they are the QIFEI ones that actually are ADS1015), so 12 channels at 12-bits ...
Entropy's user avatar
  • 23

1 2
3
4 5
16