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
0answers
19 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
25 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
21 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
54 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
37 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
30 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
35 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
39 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
53 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
31 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 ...
0
votes
0answers
31 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
56 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
46 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(...
8
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
40 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
17 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
38 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 ...
0
votes
0answers
16 views

Reading Bytestream from GPIO / External Interrupt and CLK

So I have an external device which bangs out a byte stream (DOUT), it indicates the upcoming stream on an DRDY. The timings are given on an DCLK line. These three lines (DRDY, DCLK, DOUT) serve the ...
0
votes
1answer
60 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
77 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
51 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
30 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
61 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 ...
1
vote
3answers
94 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
119 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
99 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
33 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
185 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
60 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
195 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
34 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 ...
1
vote
1answer
84 views

Can't read the analog channels from my ADC board using raspberry pi I2C

It seems like the ADC I am using does not provide instructions about how to communicate with the pi using the I2C interface. Does that mean I can't use I2C? I have the register addresses for all the ...
1
vote
1answer
74 views

how to communicate with navio2, raspberry pi 3 to ard-ltc1867 using i2c protocol to read analog data

I am trying to read analog data from a potentiometer using I2C connection between the pi and adc board using python code. Below is my code so far: import time import smbus bus = smbus.SMBus(1) bus....
2
votes
1answer
431 views

Raspberry Pi Multiple I2C Busses

EDIT: Other people I've talked to and one poster here (since deleted) have said that they have the same issue while going through the Instructables tutorial to set up multiple I2C busses. There are ...
0
votes
0answers
37 views

Connect 3 Raspberry pi using i2c

I'm trying to use i2c to exchange messages between 3 raspberry pi, all of them must receive a message do something and then send a response. Raspberry as an I2C SLAVE From here I came up with a ...
2
votes
2answers
69 views

Eight I2C buses

Is it possible to set up 8 (eight) I2C buses on a Raspberry Pi? I've been looking at software I2C using NodeJS but I am still unsure of if that's a good library. Give me tips. Backstory: I'm ...
4
votes
1answer
152 views

I2C bus hangs in master RPi access to MSP430G uC ~1 in 1000 accesses

What I've done to deal with the problem I reset the MSP430, clearing the hung state. I've slowed down the I2C clock's frequency, beefed up the Power Supply, changed pull-up resistors - no change. ...
1
vote
1answer
106 views

Pigpio reading sensor returning -83”i2c read failed”

I am testing using my new air quality 5 click sensor with my Raspberry Pi (https://www.mikroe.com/air-quality-5-click) using command line. When I enter i2cdetect -y 1it appears at address 48. Then ...
0
votes
2answers
118 views

ADS1115 simplest.py works in terminal but not in Thonny

I defined two GPIO pins as SCL and SDA for another I2C, (e.g., i2c3 on busnum=3). ADS1115 was successfully detected by runing (sudo i2cdetect -y 3). Also, the modified simplest.py (where ...
1
vote
3answers
104 views

Problem controlling LED on GPIO3

I need to add a status led to my pi zero w and after taking a look at the pin out I decided to put an led between pin 5 and 6. Please see attached picture. I soldered a blue 0805 SMD led directly on ...
2
votes
1answer
55 views

i2c-bus electrically damaged due to wrong wiring

In a hurry I mistakenly connected the VCC of the Bmp280 to ground and the ground of the Bmp280 to 5V. Afterwards, I checked the i2c-bus with another sensor but i2cdetect -y 1 only reported --. Q How ...
1
vote
1answer
38 views

Earliest place in boot for output to I2C LCD (not HDMI)

We're using an embedded Raspberry Pi that uses a (I2C) 4x20 LCD (character) instead of HDMI. Since the boot process can take some time I'd like to get something on the LCD as soon as possible to say ...
1
vote
1answer
68 views

How Can I connect 5 flex sensor in a raspberry Pi

we are making a glove based on 5 flex sensors. The problem we are facing is that flex sensor transmit data in analog version while Raspberry pi 3 receive only digital data.if we are using ADC ...
2
votes
2answers
70 views

pigpio I2C reply value

I'm sending a command e.g. "wifion" with I2C arduino(master) to RPI(slave) That works perfect but I need to return a confirmation value. How can I send back/reply from the RPI to the Ardunio a value? ...
0
votes
0answers
43 views

Multiple SDA/SCL | Getting 16x32 RGB LED to work with MCP23017?

I am close to completing a device which will have a 16x32 led matrix as well as quite a few lights/buttons/sensors. All these lights and sensors go through an MCP23017. I am using the Adafruit led ...
4
votes
0answers
96 views

Custom camera driver

Is it possible to write a driver, say for a OV camera, based on the existing drivers at the RPI git repo? As is I understand, with a datasheet for a sensor it should be possible to write a similar ...
3
votes
2answers
199 views

I2C devices - How to physically connect multiple devices

I have a one of these https://shop.pimoroni.com/products/adafruit-veml6075-uva-uvb-and-uv-index-sensor-breakout and one of these https://taaralabs.eu/1-wire-shield-for-wemos-d1/ I would like to ...
0
votes
1answer
86 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 ...
1
vote
2answers
360 views

5V-3.3V Sensors Confusion

Most of the sensors available in the market requires 3.3V-5V. The GPIO of the Raspberry Pi is 3.3V max only and not 5V tolerant. I have seen tutorials around the internet that they supply the sensors ...
3
votes
1answer
97 views

Using RTC on Raspberry Pi Zero while SDA/SCL pins are occupied

I have a portable project on my Raspberry Pi Zero and I am using a i2c 0.96" OLED on the SDA/SCL pins on my Raspberry Pi. I would like to add a RTC Module to my project, but all of the tutorials I ...