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
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 ...
0 votes
1 answer
237 views

Rpi4B python I2C AK8963C magnetometer sensor troubleshooting problem

While attempting to read data from an ak8963c sensor board over i2c I am only getting 0s as a response except when reading the first 2 registries. I have checked my connections and tried other devices ...
1 vote
1 answer
71 views

Audio cuts out periodically when using audio hat

I am currently live streaming some audio to and from a raspberry Pi Zero W using the waveshare audio hat however I have found that the audio periodically cuts out when I do this. When I used my logic ...
0 votes
1 answer
388 views

I2C communication on Raspberry Pi 3B using smbus2

I'm trying to connect my energy measurement IC with Raspberry Pi 3B using the I2C protocol. I'm using sudo i2cdetect -y 1 to detect the connected devices and it is correctly showing the address(7-bits)...
0 votes
2 answers
64 views

BME280 sensor: OSError [Errno 5]

I recently bought a Raspberry Pi 4B along with a BME280 T/P/humidity sensor. I use the bme280 and smbus2 Python libraries to interface with the sensor. For a while it worked pretty well, but yesterday ...
1 vote
1 answer
566 views

Changing I2C pins through /boot/config.txt failed

I'm trying to get the libcamera-still to work on a compute module 4 with an imx219 but I'm getting a ERROR: *** no cameras available *** Running dmesg returns [ 6.060283] pinctrl-bcm2835 fe200000....
4 votes
2 answers
5k views

How do I use the I2C bus?

I want to attach an I2C device; it has 4 lines (SCA, SDL, +, -). I understand I can connect the first two to pins 3 and 5, and the last two to various places. I also understand I can multiplex the ...
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 ...
5 votes
1 answer
2k 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 ...
2 votes
1 answer
179 views

Struggling with I2C devices

I had 2 devices connected using I2C on my Rasp pi 3b. A clock RTC8563 and a humidity sensor AHT20. Both were working. I mucked about with the wiring, and did something wrong, as I smelled smoke before ...
1 vote
2 answers
509 views

i2c not detecting ADS1115

I am using ADS1015 with my RPi4. A couple weeks ago there were no problem with the i2c module,(the components were not connected when not used), but since last week it is not detecting my device. I ...
1 vote
1 answer
173 views

i2c address not detected while trying to use Adafruit VL53L0X Time of Flight Distance Sensor

I have a Raspberry Pi 4. I am using the Adafruit VL53L0X Time of Flight Distance Sensor. I have connected a T-Cobbler to a breadboard and attached that to my Raspberry Pi. The sensor is wired ...
0 votes
1 answer
562 views

{ [Error: , Remote I/O error] errno: 121, code: '', syscall: 'writeByte' } from raspberry pi to Azure

I tried to follow the instruction below to send sensor data from my raspberry pi 2 to Azure. Connect Raspberry Pi to Azure IoT Hub (Node.js) I connected the sensors to my pi device in a different ...
0 votes
2 answers
3k views

How to interface MLX90614 temperature sensor with Raspberry Pi

I have a mlx90614 sensor and I am interfacing it with raspberry pi 3 B+. I am using adafruit library python. Below is the code: import Adafruit_GPIO.I2C as I2C I2C.require_repeated_start() class ...
3 votes
2 answers
350 views

Raspberry PI 4 B 8Gb running 2 ov9281 cameras with camarray hat: ERROR: *** no cameras available ***

I have a Raspberry PI 4 B 8Gb. I have this kit (2 ov9281 cameras with camarray hat): https://www.uctronics.com/arducam-1mp-2-stereoscopic-camera-bundle-kit-for-raspberry-pi-nvidia-jetson-nano-xavier-...
7 votes
2 answers
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 ...
0 votes
1 answer
1k views

Problem with i2c communication between arduino and raspberrypi

I have connected Rpi with Arduino using i2c communication. Pin Configuration: Rpi ---- Arduino Mega SDA SDA SCL SCL GND GND I also have an encoder attached to Rpi. Encoder `------ Rpi 5V 5V Gnd Gnd ...
0 votes
1 answer
77 views

Increase I2C-Speed with Hyperpixel 4.0 mounted

i hava a Hyperpixel 4.0 mounted on my Raspberry Pi 3A+. Because of the Pin overlay for the Hyperpixel 4.0, the I2C bus is not Standard and is created on the Physical Pins 19 and 23 on my Raspberry. (I ...
2 votes
1 answer
5k 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 ...
4 votes
4 answers
14k views

Raspberry Pi 3 not detecting i2c device

I've been following a tutorial to hook up an electronic compass that relays info to the Pi via i2c. The only differences between my equipment and the tutorial's is that I am using a Raspberry Pi 3 ...
0 votes
1 answer
117 views

i2c baudrate falling back to 160 kHz

I have set up i2c between a Raspberry Pi 4 and an Arduino with a level shifter. I have set the i2c baudrate in /boot/config.txt using dtparam=i2c_arm_baudrate=400000 But when I look at the i2c clock ...
1 vote
1 answer
1k views

PN532 with Raspberry Pi Pico

I have PN532 NFC Module that looks like this I am trying to connect this NFC Module with Pico, but I have no luck in finding library that allows me this. What can I do to control it? Can you ...
0 votes
1 answer
468 views

RTC on Raspberry Pi Bullseye shows correct time but is not registered at boot time

I am testing different RTC modules on RPi 4 running on Bullseye. On testing DS3231, I add the module to /boot/config.txt dtoverlay=i2c-rtc,ds3231 I can read the clock from it wihtout a problem. But ...
0 votes
2 answers
309 views

Raspberry Pi / I2C Slave / bsc_xfer()

Good evening. I am trying to use a Raspberry Pi Zero W 2 as an I2C Slave. Trying to implement some of the solutions using bsc_xfer in this forum, I simply cannot get any data back and forth to the ...
0 votes
2 answers
119 views

How can i set up my owm serial communication between two Raspberrys?

i have following Problem: I have A raspberry Pi 3B+ with a Touchscreen, which uses every Single Pin on the 40Pin GPIO header. The only thing i have is a i2c breakout on my Touchscreen. But i have the ...
2 votes
2 answers
2k 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
1 answer
60 views

I2C Interfacing with HIH6130

I'm trying to read data from sparkfun's HIH6130 Breakout for measuring humidity and temp data. Following this instructable (though without the i2c shield for the pi), the provided python code just ...
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. ...
0 votes
1 answer
419 views

Can I replace SCL and SDA into any other pins ? If possible How I write code?

I want to use other pins which are not default SCL,SDA unlike code that Adfruit they wrote. How can I use pin 5,6 or others that active as pin scl sda ? https://github.com/adafruit/...
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 ...
0 votes
0 answers
46 views

Raspberry Pi 4 8GB not booting Rasbian (green led blinking 3 long, 3 short; 3lL/3S - "I2C error - Pi 4")

For starters, this is the exact product I purchased. I'm not from the US and I have little access to RPis, so I bought it during my vacation (around Dez 20). It's a RPi model 4B, 8GB and what seemed a ...
1 vote
2 answers
688 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 votes
1 answer
829 views

Remote I/O error 121 with using ADS1115 for long time.sleep()

Hello together, I'm currently trying to read values from a pH-probe via an ADS1115 and the Adafruit_Circuitpython_ADS1x15 library connected to my Raspberry Pi 4. Using the instructions on https://...
0 votes
1 answer
158 views

Program to test i2c communication with serial prints breaks RP pico

Background: I am trying to test the communication of 2 raspberry pi pico using i2c. Firstly, i sent a string from one and receive it from the second one. Both of them print the results in the serial ...
0 votes
1 answer
584 views

Wiring Omron D6T Thermal Sensor to Raspberry Pi Zero W with Adafruit T-Cobbler Plus

I have a Raspberry Pi Zero W connected to a Adafruit T-Cobbler Plus and breadboard. My question is regarding wiring. I have followed tutorials to create simple circuits, however, I am struggling to ...
0 votes
1 answer
1k views

How to hook up multiple devices with sda pins?

I am building something with raspberry pi. I am using the 16x32 led matrix as well as the port expander (MCP23017). Both use the SDA and SCL pins. I am having trouble hooking it up. I realize this may ...
0 votes
1 answer
293 views

i2c clock speed is varying depending on used resource

I am having problems with my i2c bus speed on a Raspberry Pi 4. My Sensor requires clock stretching, which I set according to [these instructions (https://pypi.org/project/scd30/) When I check the bus ...
0 votes
1 answer
3k views

Raspberry Pi 2 and SH1106 OLED

Abandoned post by Unregistered user. I am trying to get a cheap SH1106 1.3" OLED from eBay working with my Raspberry Pi 2. Frm the eBay description, it says that it supports "I2C/IIC ...
1 vote
1 answer
78 views

PI4 Won't boot green led flashes 3 long 3 short I2C error

Everything was fine with my pi4 until yesterday that didn't boot. I checked the led lights and gives me 3 long and 3 short flashes. I checked in the docs https://www.raspberrypi.com/documentation/...
2 votes
0 answers
2k views

Raspberry Pi 4 - I2C scan extremely slow and not working

I am using a Raspberry Pi4 - 4GB (exact model: Raspberry Pi 4 Model B Rev 1.4) with following configuration: AME="Raspbian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)&...
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 ...
0 votes
1 answer
127 views

HAT EEPROM DTB and RTC on I2C0

I'm having a problem creating a DTB for a HAT auto-configuration. I have a DS3231 RTC module attached on I2C0 (GPIO0 and GPIO1). It incorporates an AT24C32 EEPROM at address 0x50. To get it working, ...
0 votes
0 answers
51 views

Raspberry Pi 4 - hwclock DS3231 RTC delay at boot

Running a Raspberry Pi 4 with a DS3231 RTC setup. Everything is setup correctly and working fine and the hwclock is synced correctly. The unit is running without any internet connection. The problem ...
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 ...
0 votes
1 answer
473 views

Ubuntu 20.04 'Focal' cannot find all I2C devices via i2cdetect; it get a few, though

This is puzzling me: I use Ubuntu 20.04 'Focal' on a RPI CM4. When I run i2cdetect -y 1 to list the connected I2C devices on /dev/i2c-1, I get a few addresses back that correspond to the custom PCB I ...
0 votes
2 answers
2k views

ImportError : cannot import name i2c

so I've recently set up my raspberry pi. Am following a tutorial for the MPU9250, from https://github.com/tuupola/micropython-mpu9250. I have did a install of the micropython-mpu9250, and tried the ...
0 votes
1 answer
73 views

Multiprocessing to speed up data acquisition for I2C devices

Here's my situation: I have four FDC1004 devices that I want to have connected to an array of 64 electrodes through four ADG1206 16:1 multiplexers. Each device is slaved to a pi4 using separate I2C ...
2 votes
1 answer
683 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 : ...
6 votes
2 answers
389 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 -- -- -...
1 vote
1 answer
96 views

ServoMotor I2C module

I want to control a ServoMotor with THIS module: I asked a question before in THIS topic. And as you can see in the topic, they guided me perfectly. And they said I should use THIS code. But I have a ...

1
2 3 4 5
16