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
1
vote
1answer
46 views

How can Rpi4B use python to talk to the I2C DHT20 / SHT20 temperature and humidity sensor?

I'm trying to use a Raspberry Pi 4 to read an I2C temperature and humidity sensor. The part I'm using is a module from Grove based on the DHT20 sensor. Here's a link to a page about the module: https:/...
0
votes
0answers
11 views

Raspberry Pi Zero W with SparkFun Pulse Oximeter and Heart Rate Monitor (MAX30101 and MAX32664 )

I am trying to read data by connecting Raspberry Pi Zero W with SparkFun Pulse Oximeter and Heart Rate Monitor (MAX30101 and MAX32664). SparkFun has provided the code for Arduino Library Any ...
-1
votes
0answers
20 views

Monitoring GPIO and MCP pins in same Python program

I currently have 2 Python programs, one is monitoring the GPIO pins and another is using I2C and the MCP pins for I/O. I'm able to code for either separately, but would like to monitor I/O from GPIO ...
0
votes
0answers
13 views

MPU6050 on I2C is intermittently connected

I have several MPU6050 that will sometime show up in 'sudo i2cdetect -y 1' as 68. When it is there my python code that reads them works. Then randomly the code will fail to see the sensor, and when ...
1
vote
0answers
23 views

I2C Not Being Detected After Running Code For HMC6343

Found a code for finding heading for HMC6343 compass on the raspberry pi 3 Model B. This is a freshly installed raspbian, I connected the device and checked with i2c tools that it's being detected and ...
-1
votes
0answers
22 views

16 Port Servo Driver Disconnects Anytime It Is Accessed With Python

I have a 16 port servo driver (from adafruit) connected to my raspberrypi 4 model b. To power it, I cut a usb-cable and plugged one end into the USB 3.0 ports on the raspberrypi, and the other end ...
2
votes
2answers
87 views

Removing noise from I2C inputs

Removing noise from I2C inputs. I have 32 input switches to monitor so I’m using multiple MCP IC‘s communicating over I2C. I’m getting noise when nearby solenoids are activated. There is no impact on ...
0
votes
1answer
24 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 ...
0
votes
0answers
49 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 ...
2
votes
3answers
71 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, ...
0
votes
1answer
25 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 ...
0
votes
0answers
23 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, ...
1
vote
1answer
60 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 ...
0
votes
1answer
21 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
1answer
38 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 ...
1
vote
0answers
58 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 ...
0
votes
0answers
14 views

3rd party NES mini controller not returning data

I have a 3rd party I2C controller (not original) that I want to interface with some hardware and so I'm bitbanging I2C into the controller. When I scan all devices 0 to 127 then I see an ack at 0x52 ...
0
votes
2answers
20 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 ...
0
votes
2answers
41 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 ...
0
votes
0answers
37 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 ...
-1
votes
3answers
76 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 ...
-1
votes
1answer
45 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 ...
0
votes
1answer
96 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
0answers
39 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 ...
0
votes
2answers
152 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 ...
-1
votes
1answer
61 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 ...
2
votes
1answer
380 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 ...
0
votes
2answers
29 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 ...
0
votes
0answers
34 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 ...
1
vote
2answers
163 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."...
0
votes
0answers
12 views

Controlling Adafruit 7-Segment i2c Backpack via Node Red

Background I have wired up an Adafruit 7-Segment LED display with I2C Backpack to my Raspberry Pi as per the Adafruit instructions here. I can control the display from Python code without any problems....
0
votes
1answer
121 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, ...
1
vote
0answers
84 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 ...
0
votes
1answer
173 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
1answer
49 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 ...
2
votes
2answers
655 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 ...
0
votes
1answer
251 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 ...
3
votes
1answer
553 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....
1
vote
0answers
41 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 ...
0
votes
0answers
23 views

Problems with Raspberry and touchscreen

I'm working on a Raspberry Pi project and I need to use touchcreen, I got 7" Waveshare touchscreen, I plugged it in my Raspberry Pi (via GPIO pins) and touch didn't work... I went on their ...
0
votes
0answers
17 views

Connect and control Grayhill 67B Joystick using I2C

so I have a Grayhill 67B Joystick and want to control a pump using a motor driver (https://www.pololu.com/product/2995). In the manual I found the Pinout of the Joystick: Link to Manual: https://www....
1
vote
0answers
45 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 ...
0
votes
0answers
50 views

Using multiple PCF8591 on one Pi

I'm trying to figure out how I can connect multiple PCF8591 chips to a single Raspberry Pi. As far as I can see, it has only one set of SDA and SCL pin(s). My eventual goal is; I have about 9 gas ...
0
votes
1answer
62 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% ...
1
vote
2answers
153 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. ...
0
votes
0answers
27 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, ...
1
vote
1answer
90 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 ...
1
vote
1answer
108 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 ...
1
vote
1answer
193 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-...
1
vote
4answers
922 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 ...

1
2 3 4 5
15