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
19 views

Pico W I2C timeout occurs when using multiple sensors on a single bus

I am using to VL53 lidar sensor chips on a single I2C bus. This specific chip does not have an option to change I2C address through hardware and so I must do it through software. This works and I am ...
Joe Moore's user avatar
  • 181
0 votes
0 answers
44 views

How to enable Raspberry Pico's I2C0_IRQ and set a callback function using MicroPython?

I need to setup a Raspberry Pico as a I2C Slave device. I know how to do this, but I don't know how to eneble the I2C IRQ and set a callback function on it so I can be notified of the I2C events ...
Marus Gradinaru's user avatar
0 votes
0 answers
16 views

2nd MUX PCA9548A not showing up

Trying to add a 2nd MUX on bus 1 of my Room. I added the following to the config.txt, essentially duplicating my original MUX with a second one, changing the address: dtoverlay=i2c-mux,pca9548a,addr=...
TriLife's user avatar
1 vote
0 answers
34 views

MCP23017 connected to raspberry pi not showing up until I remove and reconnect SDA cable

I am testing an MCP23017 I2C port extender connected to a Raspberry Pi Zero 2w. I can get i2cdetect to detect the extender only after I remove and reconnect the cable going to SDA (GPIO2). I have to ...
joe_coolish's user avatar
0 votes
1 answer
71 views

I am looking for clarity on how the libgpiod works with higher functions (esp I2C)

I am working on a RPi 5 running Bookworm with C. Adding the line dtparam i2c_arm=on to the config.txt enables I2C on GP Pins 2/3 accessed through /dev/i2c_1. Reboot to activate. This works fine on ...
Nic A's user avatar
  • 1
0 votes
1 answer
60 views

It is possible to set I2C bus speed programmatically without the bcm2835 library?

All, I've ported a C++ OLED library from the bcm2835 library to use i2c-smbus to prevent having to run the executable as root. (not the best from a security standpoint). However, i2c-smbus and ioctl() ...
David C. Rankin's user avatar
0 votes
0 answers
36 views

Connecting multiple sensors, servos, etc. to Raspberry Pi 4 B

Hello everyone 👋 I recently got a bunch of sensors, servos, transmitters, etc. (like literally I have now a hundred of different sensors) But now, how to connect it all to Raspberry Pi (in my case ...
bbybunny's user avatar
0 votes
0 answers
20 views

Pi Zero as I2C slave

I'm trying to set up a Pi Zero as I2C slave via the pigpio library. While receiving data seems to work great, sending data is a problem. When the host asks for data for a given register, the request ...
Bill F's user avatar
  • 101
0 votes
0 answers
38 views

Where is the C file with the I2C functions?

I can find in raspberry pi (5), using Raspbian, in directory /usr/include/linux the files i2c.h and i2c-dev.h. I am looking for the .c files that have the I2C functions and use the header files. ...
Christianidis Vasilis's user avatar
0 votes
0 answers
26 views

Does I2C clock also change if system clock is altered? Pi4

SPI clock speed is tied to system clock so for example of the system clock changes the SPI changes. To prevent this you need to prevent power scaling/fix the frequency. Is this also the case for I2C ...
FourierFlux's user avatar
0 votes
0 answers
40 views

Connect Raspi to touch display via I2C

I have a touch display with a microcontroller. That microcontroller will read the touch data and convert it linux multi touch protocol and send to raspi via I2c. Hardware is setup properly. Raspi can ...
Sam's user avatar
  • 133
0 votes
1 answer
47 views

DPI conflict with i2C

I am getting following error, Kindly help. I have tried understanding dtbo files, changing config also. still no luck. I want to know, how i can assign gpio pins to i2C (picamera2)and DPI (4inch DPI ...
abhishek's user avatar
0 votes
0 answers
25 views

Raspberry Pi Zero detecting too many i2c

After this command in raspberry pi i2cdetect -y 1 Its detects too many i2cs 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: 08 09 0a 0b 0c 0d 0e 0f 10: 10 11 12 13 14 ...
Vinit Yadav's user avatar
0 votes
0 answers
17 views

Diagnosing / Debugging I2C comms on the command line

This is sort of a vague question, and I apologize for that. I am trying to gain enough understanding and context to ask a more detailed one. But here goes: Q: To what extent is the I2C bus self ...
jojo hohanon's user avatar
0 votes
2 answers
182 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 ...
MPA's user avatar
  • 103
0 votes
0 answers
62 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 ...
Fabio Freitas's user avatar
0 votes
0 answers
60 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 ...
William's user avatar
0 votes
0 answers
29 views

Can raspberry Pi support TWI communication?

I have an image sensor MT9V034-D, which is manufactured by onsemi. It is supposed to be controlled by TWI with a SCLK and SDA input, I want to use Raspberry Pi to control it. I know that Raspberry Pi ...
Jingxuan Cai's user avatar
1 vote
1 answer
266 views

Why is my measured I2C clock frequency significantly slower than its setting?

I am setting the I2C frequency on the Compute Module 4 (running Ubuntu 22.04.2 LTS) with dtparam=i2c_arm=on,i2c_arm_baudrate=400000. The I2C bus has two parallel 10kOhm pullup (to 3.3V) resistors per ...
Eric's user avatar
  • 21
-1 votes
1 answer
115 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 ...
Dallon Penney's user avatar
0 votes
1 answer
1k views

I2C Device is not detected

Another issue arises since my last question which I have not solved yet. I am trying to use SGP40 sensor on Raspi4 the sensor has built-in pull up 10k resistors in both SCL and SDA, the sensor VLogic ...
Zak's user avatar
  • 11
0 votes
1 answer
106 views

did I fry Raspi I2C pins?

So I wanted to test a sensor I have on the pi, the sensor has on-board level switchers supports both 5V and 3.3V with a 10k pull-up resistor for both SCL/SDA, Mistakenly I wired the Vin into the 5V ...
Zak's user avatar
  • 11
-2 votes
1 answer
191 views

Using 2 SDA and SLC for 2 different sensors

So, Currently I am using a RTC with my Pi. It takes up the SDA and SCL pins which are GPIO2 and GPIO3. I now wish to add a Lux sensor. I am using the BH1750 Light Sensor. It too needs to use the SDA ...
Andrew Simpson's user avatar
-1 votes
1 answer
365 views

ValueError: No I2C device at address: 0x29 (and others) with TSL2591 on raspberry pi zero W with pijuicezero

I am trying to get the TSL2591 outputting values on a raspberry pi zero W with extended pins and a pijuice zero over it. The following code import board import adafruit_tsl2591 import time i2c = ...
Ajned's user avatar
  • 109
0 votes
1 answer
147 views

MCP23017 not seen in the i2c bus

I have a pin multiplexer with a premade board: https://core-electronics.com.au/mcp23017-io-expansion-board-expands-16-i-o-pins.html My Pi 4 is powered by USB C. The multiplexer is powered with its ...
Merc's user avatar
  • 145
0 votes
0 answers
103 views

Raspberry pi power up button and i2c devices

I have a ads1115 connected to my i2c pins of the raspberry pi. The i2c pins are pin 2 (i2c-SDA) and pin 3 (i2c-scl). Additionally i want to power up and shutdown my pi with the WAKE_ON_GPIO. Example. ...
maja95's user avatar
  • 1
0 votes
0 answers
158 views

i2c LCD Backlight

I have an LCD display that has a backlight (since when I plug it in it lights up). However, using the code below I cant get it to turn on. Any help would be greatly appreciated import smbus import ...
Amanda_Sterling's user avatar
0 votes
1 answer
801 views

Python code cannot detect my i2c address

I would like to ask some opinions regarding i2c communications with pca9685. My i2c1(SDA=GPIO2, SCL=GPIO3) of my rpi 4b is used by my mpu6050, which I had to enable one more i2c channel of my ...
Bobking's user avatar
  • 11
1 vote
0 answers
119 views

PCA 9685 i2c communication issue

I would like to ask a question regarding the usage of secondary channel of i2c in rpi 4b. I have enabled the secondary channel through adding "dtoverlay=i2c-gpio,bus=2,i2c_gpio_sda=22,...
user153780's user avatar
3 votes
2 answers
515 views

i2c Real Time Clock IC on Raspberry

I am using an industrial device based on a Compute Module Raspberry Pi 3 called Kunbus RevPi Core 3+. The device is shipped with Raspbian and a pre compiled Image but I would like to install an ...
Stefano Bossi's user avatar
0 votes
3 answers
36 views

I2C Ievel shifter with no device overloads IDs

Im having a problem with my current project. I am using a 128x32 oled for stats and an RTC. I also have a logic level shifter with a plug attached for optinal extention(like lcd, etc) running on 5V. ...
Steve's user avatar
  • 9
2 votes
1 answer
257 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 ...
pir8ped's user avatar
  • 129
2 votes
1 answer
114 views

Multiple Sensors connected using I2C with different addresses software approach

I'm using a Rapberry Pi 4 Model B with 4 same I2C sensors. I want to get real-time data from them, but my knowledge of I2C is limited. I know that I can connect them, using different buses, but same ...
ExhaustedCProgrammer's user avatar
0 votes
1 answer
116 views

Using TCA9548A for multiple MQ-X gas sensors

I have about 8-9 gas sensors I want to use on my Pi but I'm trying to understand how to use The TCA9548A. The TCA9548A Has 8 pairs of SDL and SCL pins to handle multiple I2C devices, but the output ...
Katianie's user avatar
  • 151
-1 votes
2 answers
370 views

How to run Hyperpixel 4.0 on I2C-0 (GPIO's 44&45)?

I use a Hyperpixel 4.0 touchscreen in combination with my custom ComputeModule4 board. I've seen on the CM4 that there is one more I2C-Bus on GPIO's 44&45 which could be used. Is there any ...
Manuel Neff's user avatar
1 vote
0 answers
33 views

I2C 1 light at a time`

i am currently using the NCP5623 (I2C LED Driver) to light up my 5V 1A (as written on the box) RGB LED strip. i followed the sample connection as shown on the datasheet of the NCP5623 and when i ran ...
seonghwife's user avatar
0 votes
1 answer
269 views

i2cdetect shows addresses starting from 8

I have currently installed the latest raspbian as of posting this question. I have an i2c device with address 0x03 which works when running my program I successfully communicate with it, but when I ...
php_nub_qq's user avatar
2 votes
1 answer
430 views

16x2 LCD text not showing up on Pico W

I have been using an online tutorial, https://www.youtube.com/watch?v=B8Kr_3xHjqE&t=166s, to display text on a LCD. The LCD can do all the functions except the displaying of text. I know there is ...
DevBev3's user avatar
  • 25
3 votes
2 answers
465 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-...
fghoussen's user avatar
  • 131
0 votes
1 answer
416 views

how to use a multiple rc522 (RFID) sensors with i2c on a PICO with a Adafruit PCF8575 board

I've been looking through the web for the case of multiple rc522 (RFID sensors) attached to a PICO/W using I2C. Most of the examples and Micropython library code seem to be using SPI. Can someone ...
quinn's user avatar
  • 101
3 votes
2 answers
441 views

i2c_arm bus initialization and device-tree overlay

I've built a Pi1541 HAT, just for fun, and am now playing with the device-tree autoconfiguration in Raspbian. I've made an overlay that autoloads during boot, based on the EEPROM contents, and that ...
Hans Liss's user avatar
1 vote
1 answer
762 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....
Max's user avatar
  • 121
0 votes
0 answers
39 views

i2C Using IO Pi Plus Only receiving half of the interupts

Morning, I'm a newb to this, so suspect i'm just doing something silly, or don't quite understand what i have written. Either way... here we go. I have a Pi with an IO Pi Plus board attached (https://...
Andy's user avatar
  • 101
1 vote
1 answer
40 views

I2C OS error when activating motors

I'm building an autonomous robot controlled by a Raspberry Pi 3 and I'm having a problem reading the sensor. I'm using an H Bridge board to activate the motors and an I2C gyroscope sensor (MPU6050) ...
Danilo Namitala's user avatar
1 vote
2 answers
171 views

Problems with I2C communication

Hi I am attempting to test I2C comms between an pi model 4B and teensy 4.1 (running code uploaded from the arduino IDE via usb). While I can read from the slave with a python script if the arduino ...
Shovel_jockey's user avatar
1 vote
1 answer
210 views

Pi camera gets stuck when using Raspistill

My setup is using a Pi compute module 4 to readout an IMX219 Pi camera. In between those two is an FPGA through which all signals are routed (I2C and MIPI). I got the I2C module in the FPGA working, i....
Max's user avatar
  • 121
1 vote
1 answer
401 views

Rasperry Pi 4 - Python i2c Device Not Found

I'm having a hard time setting up a i2c device on a pi4. I did i2cdetect -y 1 But when I run the python code import board import busio import adafruit_ads1x15.ads1115 as ADS i2c = busio.I2C(board....
Jith's user avatar
  • 13
0 votes
1 answer
144 views

pigpio I2C error

I would like to write 16 bits of data to an I2C bus. Considering that the data to be transferred is not in a list, I am using the pi.i2c_write_device() function, however I get the following error: ...
user49706's user avatar
0 votes
2 answers
199 views

Raspberry Pi and bscXfer/bsc_xfer not reliably passing data between Arduino Master

Data passed between a Raspberry Pi, configured as an I2C slave device, is not reliably transmitting between an Arduino I2C bus master device. Data is consistently getting lost, and slave responses are ...
tenchiro's user avatar
0 votes
1 answer
2k views

Raspberry Pico SDK - I2C Write to one Register Address (to set mode) then Read data from 2nd Register Address

I'm a bit confused by i2c_write_blocking() and how to specify the device_address, register_address and data to prime a device for reading and then to read data from another 2nd_register_address in the ...
David C. Rankin's user avatar

1
2 3 4 5
17