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
2answers
31 views

How to interface more than 10x ADS1115 a raspberry pi?

Hello i am creating a shield for raspberry Pi 3/4 and in need of a lot of analog pins to read 30 sensors. and since the shield can only fit 5 sockets of the connector i am using i need to use 2 ...
0
votes
1answer
29 views

Slaves on i²c bus aren't detected

I'm currently trying to get multiple i²c slaves with the same address working without the use of a multiplexer on a PI Model 3b. I followed this instrutable for the creation of a second i²c bus: cd /...
1
vote
1answer
54 views

Need advice for connecting multiple arduinos to raspberry pi

I have a project in hand where I need to connect 5 arduinos as slaves to Raspberry Pi. Load Cells, Reed Switch, Solenoid lock will be connected to each of the arduino. The arduinos need to send the ...
0
votes
0answers
34 views

Issue with I2C communication with raspberry pi and arduino

I am new to I2C communication and python coding so please bear with me if my question is naive or my code looks very bad. I am able to achieve I2C communication between raspberry pi and arduino and ...
0
votes
1answer
45 views

How to physically wire two I2C sensors' SCL/SDA signals to a single I2C bus?

I need to connect two sensors like this https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcRDDlL2AK_eYo9BKbImJcekMZ0PgIYC2GL0OLIMVGzkWAtq54zG to rpi 3 b. I found that it is not a problem and ...
2
votes
2answers
49 views

Adding I2C Bus with dtoverlay Does Not Show Up in i2cdetect

I am trying to set up multiple I2C interfaces on my pi. I have added the following lines to my /boot/config.txt and rebooted: dtoverlay=i2c-gpio,bus=4,i2c_gpio_delay_us=1,i2c_gpio_sda=29,...
0
votes
1answer
28 views

How to access BCM i2c registers? i2c speed halves on raspbian buster (Zero W, Pi 3 B, Pi 4 B), fine on raspbian stretch

I have a problem with I2C clock in Raspbian Buster (using either SMbus or i2c-dev). It defaults to 50 kHz on RPi 4B and to 62.5 kHz on RPi 3B and Zero W. However, if I set the speed i2c_arm_baudrate=...
0
votes
1answer
19 views

Stacking together two I²C hats with different voltage

I plan to make a domotic system based on a raspberry pi. I choose a grove hat to connect sensors and relays, but I need a digital potentiometer and grove system does not have that. So I plan to buy ...
1
vote
1answer
97 views

How to connect two BME280 sensors via I2C to a Raspberry Pi 3B+

I have a Raspberry Pi 3B+ and I bought two BME280 sensors (specifically these) and I would like to connect them via I2C. I read that you can do software multiplexing but all the information I am ...
0
votes
1answer
51 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 ...
3
votes
1answer
43 views

Pi locking up trying to use rising/falling edge detection

I have a B+ v1.2, with a motor controller and 2 quadrature encoders setup. It's running Arch: 4.19.69-2-ARCH armv6l. It's completely locking up, requiring a plug-pull when either of the encoders ...
0
votes
1answer
31 views

PIGPIO not detecting I2C device but i2cdetect -y 1 detects it and I can even run my codes well in SMBUS

I have a Raspberry Pi 3 Model B+. My I2C device which is this (exact breakout board) isn't getting detected through PIGPIO Library. The sensor works very well with the example codes which uses SMBUS ...
1
vote
1answer
31 views

I2C communication between two arduino masters sending events and one raspberry pi slave

I have two arduinos intercepting events. They have to deliver these events to a raspberry pi. According to my understanding of the I2C protocol, the RPi must be configured as slave, and the two ...
0
votes
1answer
110 views

Can't use my Raspberry Pi 3 B+ for I2C in high speed mode

I've been trying to use a Raspberry Pi 3 B+ to get data from an accelerometer, namely an ADXL 357, via I2C but the problem is that the data rate is about 200 Hz or even less. I tried to set the ...
0
votes
1answer
29 views

Why i2cdetect slave can not detect polling way but interrupt can?

I had tried to use rpi as master to detect slave. The slave is MCU, using polling to answer rpi's request. However, when I tried to use rip to check the slave address, using command : i2cdetect -y 1 ...
1
vote
0answers
36 views

Why does writing to I2C is too slow in Python comparing to C? [closed]

I am trying to find out why the same code in Python works 25 times slower than C even if I use CDLL, when I try to write into I2C. Below I will describe all the details what I am doing step by step. ...
1
vote
1answer
31 views

intermittence in Adresses on a I2C bus when using more than 5

Hello im doing and experiment trying to Expand my raspberry to use 7 I2C devices (MCP23017 E/SP) its my first time using more than 1 MCP Im using SparkFun Solderable Breadboard to conect Pi 5v / GD ...
0
votes
1answer
55 views

Using Normal GPIO Pins as I2C (required)

We are attempting to use the Raspberry Pi as an embedded software platform. We are writing this in python, but currently we have it wired up to use 3 separate I2C busses. We have two of them wired to ...
0
votes
0answers
26 views

Oled Display doesn't work properly

Im using my Raspberry Pi zero W For an project with an Oled display and i can't get it to work properly I Installed Adafruit and tried the examples. It didn't work and i tried an other example but ...
1
vote
0answers
35 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 ...
0
votes
0answers
38 views

How to get and set the byte in EEPROM - Waveshare AT24/FM24 using i2cget and i2cset command?

My raspberry pi is 3 Model B v 1.2. I have changed the i2c baud rate to The configuration in my raspberry pi are # cat /boot/config.txt # For more options and information see # http://www....
0
votes
1answer
33 views

How rpi3 as slave use i2c with wiringPi

I tried to let my rpi3 with wiringPi as slave to receive data from master and data +1 send to master . mater send 1 to slave (rpi3) My rpi3 SDA is GPIO 18 ,SLC is GPIO 19 the code on my rpi3 : #...
1
vote
1answer
66 views

i2cdetect shows two device address

I have interfaces Atmel 24C04 EEPROM to raspberry PI 3b+ and used i2cdetect to verify if the interfacing is done properly. I am new to this area and trying to learn by doing some hands on. After ...
1
vote
1answer
49 views

Does the Pi4 have pullups on SDA/SCL?

I can't find a full Pi4 schematic but I gather some previous Pis have had pullups on these two lines whilst others haven't, along with much discussion on whether hats should have a pullup or not. ...
0
votes
0answers
44 views

Simple Sound Card with I2S - how do I switch frequencies?

I asked this a month ago, but didn't get an answer and so the thread was auto-deleted. It is becoming critical that this be solved, so I am reposting. I have the simple sound card working with a ...
2
votes
1answer
44 views

Reading more than 8 bits from an SI7021 sensor

I am using the Si7021-A20 sensor on a Raspberry Pi Zero WH (headless, controlled via ssh and VNC). I want to get readings using Python (version 3). However, I have a very hard time to actually get ...
1
vote
1answer
41 views

Peculiar features of I2C communication between RPi and Arduino

I am currently trying to establish two-way communications between an Arduino Leonardo and a Pi model B using the I2C bus, as slave and master respectively. Spookily, the Pi can successfully send ...
2
votes
1answer
65 views

I2C Communication between Arduino and RPi failing when Arduino is sending data

I'm trying to read some data from the Arduino slave and when I receive the data it shows some numbers but not the correct ones. I'm using node and i2c-bus module, also tried with wiringPi but got the ...
0
votes
1answer
40 views

DS3231 doesn't update its internal time?

UPD: with another chip of the same model RTC works just fine, presumably that the chip was broken/damaged. I installed DS3231 RTC clock ( which is detected as DS1307 for some reason). My config.txt ...
1
vote
0answers
68 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 ...
0
votes
1answer
97 views

Multiples i2c devices with the same address

I am trying to find the simplest way to connect multiple 15 IMU sensors (ICM-20948) to a wearable suit.The thing is that they all have fixed addresses. The solutions I found so far are: Using a ...
0
votes
0answers
70 views

Input/output error using Python ADS1115, and a Raspberry Pi

I am trying to read an analog signal using ADS1115 and a raspberry pi. Sometimes it reads and some time result into error. Following is the code snippet response = {} adc = Adafruit_ADS1x15.ADS1115(...
9
votes
1answer
1k views

Pi 4 I/O interface options… and where to find them

The BCM2711's hardware documentation lists multiple I/O interface options. Among others these are: up to 6 × I2C, up to 6 × UART (muxed with I2C), up to 6 × SPI (only five exposed on Raspberry Pi ...
1
vote
1answer
43 views

How do I know my PCF8951 is not broken?

I am using some PCF8951 board like this: I remove all the jumper, like this: This is every thing: Then I plug two senor board to this board. Everything plugs into AIN0 will get the correct value. ...
1
vote
0answers
19 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
2answers
40 views

Setup requirements for multiple i2c sensors

I'm building a project that requires a pi to query multiple 9-DoF IMUs through I2C ( ideally up to 100, but 16 should be enough for the start). I'm wondering if this is even possible and what kind of ...
1
vote
1answer
67 views

Reading Bytestream from GPIO / External Interrupt and CLK

So I have an external master device which bangs out a byte stream (DOUT), it indicates the upcoming stream on an DRDY. The timings are given from the master on an DCLK line. These three lines (DRDY, ...
0
votes
1answer
77 views

128x64 OLED Display Issue [closed]

I have a cheap display I got from eBay connected to a Raspberry Pi B+. It has 4 pins (vcc, gnd, scl, sda). I followed the adafruit tutorial here but after setup, when I run a python example (any of ...
0
votes
1answer
106 views

WittyPi on Pi Zero W - I2C read / write fail

I've connected WittyPi2 (an RTC Power Management hat) to my Pi Zero W - but I'm constantly getting failures in the log, to do with the I2C communication: I2C read 0x01 0x68 0x09 failed (result=), and ...
0
votes
0answers
58 views

Run i2c repeated start with pi4j

i´m using pi4j at my raspberry pi. It´s possible for me to write and read to and of devices which don´t need a repeated start. But now i need to run the repeated start for a device. I already tried ...
2
votes
1answer
34 views

Changing between I2C and GPIO in the same application

My program is a test system. It should first set SCL=1, SDA=0. Read some values from other GPIOs. Then set SCL=0, SDA=1. Read some values from other GPIOs. This is in order to verify the integrity of ...
1
vote
1answer
77 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 ...
2
votes
3answers
145 views

Options to add 20 UART to RPi

So I am undergoing a project where I will need to add 20 UART (RX/TX) to a single raspberry Pi 3. Each device runs at 9600 After looking at the pi, I found it only has 1 UART on it. What would be ...
0
votes
1answer
163 views

use raspberry 3+ and PN532 Itead with i2c

nfc-scan-device uses libnfc 1.7.1 1 NFC device found: error libnfc.bus.i2c error : worte only -1bytes (10 expected) error libnfc.driver.pn532_i2c Unable to transmit data(TX) pn53x check_communication:...
3
votes
2answers
113 views

Random i2c SDA spikes (bit flip)

I'm trying to communicate with an old i2c device and I'm getting wrong read values, and possibly even some incorrect write values too. My logic analyzer shows random highs in the middle of a low. ...
1
vote
1answer
40 views

Incorrect i2c read bytes

NOTE: Please read the bottom. There's a plot twist. I'm reading three bytes and my NodeJS code reads 3, 192, 144 in decimal while my logic analyzer reads 0x03, 0xC0, 0x10 which translates to 3, 192, ...
3
votes
2answers
206 views

/dev/mem vs /dev/i2c-1

What are advantages and disadvantages in accessing I2C and other interfaces directly with /dev/mem (as in this code) instead of using /dev/i2c-1 (as in most examples like this)?
2
votes
1answer
77 views

Arduino slave initiating an I2C transmission to Raspberry Pi master

Is there any way for an Arduino slave to send a byte array to the raspberry pi master without the master having called on it?
2
votes
1answer
283 views

PoE hat fan activation on OS other than Raspbian

I'm aware that the only officially supported OS that the PoE hat works on is Raspbian. I can confirm that both my hats work, and that the fan does switch on and off if I have Raspbian installed on the ...
1
vote
0answers
36 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 ...