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
1answer
22 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 ...
0
votes
0answers
17 views

Enabling software i2c causes boot failure

I have a Raspberry Pi 4 model B, fresh installation of Raspberry Pi OS. I am trying to use software i2c to get around the clock stretch bug in the broadcom 2835 chip. I edit /boot/config.txt to ...
0
votes
2answers
21 views

I2C Device Registered on CLI but not in Python

I have a JANSANE 16x2 1602 LCD I2C that i purchased and am trying to run on a raspberry pi 3 b+. Following this tutorial https://learn.adafruit.com/adafruit-16x2-character-lcd-plus-keypad-for-...
0
votes
0answers
37 views

BMP180 OSError: [Errno 121] Remote I/O error

At the moment I am trying to get readings of pressure from a BMP180 on a Raspberry Pi (OS : Noobs) So far, I have been successful with connecting the device with the pins and the I2C is detecting the ...
1
vote
1answer
27 views

SSD1306 I2C 0.96" OLED Rpi Interface Problem

I have a Raspberry Pi 3B+ running Raspbian Stretch Lite. I also have an SSD1306 0.96" OLED display. Sometime ago, I had written a simple lightweight library for using this OLED with arduino over i2c. ...
0
votes
0answers
31 views

Problem I2C when using BH1750 photoresistor

(Raspberry Pi 2, model B, V1.1 - buster OS - all updated / upgraded - smbus loaded on) Hi, I am quite new to the Raspberry Pi and recently I have hit a brick wall. I am trying to link the Raspberry ...
0
votes
1answer
14 views

edt_ft5x06 touchscreen probe failed with code -121

I am trying to get ER-TFTM070_5 display with capacitive touch screen to work. I hae gotten as far as getting the screen it self to work. Now I am facing a challenge to get the touch screen digitiser ...
2
votes
3answers
35 views

connect multiple temperature sensors to rpi

I need to connect multiple temperature sensors to my RPI. can you, please, elaborate whether/how can this be done with this or this unit? or can you suggest other unit? I need to measure temp on the ...
0
votes
0answers
14 views

Problem in initiating i2c driver module for bmp180 i2c based sensor at kernel level

For leaning purpose i am writing a i2c client kernel module for bmp180 pressure sensor. My kernel code is -> #include <linux/version.h> #include <linux/module.h> #include <linux/init....
0
votes
1answer
18 views

Can't compile i2c_smbus_write_byte on Raspberry Pi 4

Has anybody tried using the i2c_smbus_write_byte or any similar function on Raspberry Pi 4? I can't get it compile it fails at the linking with not finding it. I'm using it as described here: http://...
1
vote
1answer
46 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 ...
3
votes
3answers
241 views

What hardware peripherals might be capable of reading 6.144, or better yet, 9.216 megabits/second?

I'm hoping to interface a Raspberry Pi 4 with an 8 channel, 48 kHz ADC. Ideally a 24 bit ADC, which if my math is right means 9.216 megabits per second. But a 16 bit ADC would be acceptable: that ...
1
vote
1answer
294 views

How can Rpi read the MAX30100 / MAX30102 Oximeter?

I want to connect the sensor max30100 to the Raspberry Pi board.I think everything is accurate.When I run the code, the red light flashes.I activated I2C.max30100 device address 0x57 is detected. When ...
2
votes
0answers
44 views

Controlling a laser rangefinder via the raspberry pi

First, a disclaimer that I am an electronics newbie. I got my hands on a laser rangefinder which looks very similar to this: On the top left corner, there are two sets of pins. The first set has ...
2
votes
1answer
40 views

How to write 16 bit data to device address using the i2c wiringpi lib

I am trying to write 16 bit data to i2c device . As there are no registers specified to write to the slave device, I am not able to use the built-in wiringPiI2CWriteReg16 Api. Can some one guide me ...
0
votes
0answers
22 views

Selectively disable i2c on Rasbian Buster

I want to disable i2c0 while keeping i2c1 active. Everything I can find either disables or enables both, but I haven't found a way to only activate one of them.
1
vote
1answer
37 views

VL53L0X error: “API Status -20: Control Interface Error” [closed]

I had a working prototype which detects distance. Plugged it in yesterday and it keeps giving me an error: API Status -20: Control Interface Error. I checked up i2cdetect and I'm getting the output:...
0
votes
0answers
9 views

Adafruit speaker bonnet + camera module

I’m trying to use the Adafruit Speaker Bonnet in conjunction with a raspi camera module. However, it seems as if they conflict and only one device can function at a time. Is there a way to fix this ...
1
vote
0answers
45 views

Trouble Detecting Devices on Added I2C Buses

I decided to add additional i2c buses to my raspberry pi 4 through the use of gpios and overlays. I first came across this idea from this post by the instructables. Through editing the config.txt file ...
1
vote
1answer
33 views

Can I Re-Purpose My I2C EEPROM Pins to Act Like SDA/SCL Pins?

Somehow during an experiment, I managed to wreck my i2c SDA and SCL pins on my raspberry pi (pins 3 & 5). I was considering converting two of my gpio pins into another i2c bus, but I thought it ...
0
votes
0answers
28 views

Elapsed time on function

I am getting a bit of confusion when it comes to getting the run-time of a function I have that gathers data and stores it for me. I have written code for a sensor connected to a raspberry pi zero and ...
0
votes
0answers
18 views

C++ Code not compiling of RPi after upgrading from Wheezy to Buster

I am getting the error: ‘i2c_smbus_write_byte_data’ was not declared in this scope when trying to compile GPIO code. I have a clean install of Buster (I had accidentally corrupted Wheezy). On Wheezy, ...
2
votes
1answer
58 views

Direct reading from i2c

I am attempting to increase the frequency at which I read samples from the I2C dedicated pins. I have attempted this through the wiringPi library (C code), from which I reached just about 900Hz. As ...
0
votes
1answer
63 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
3answers
554 views

What is Rpi's I2C Maximum Speed?

The raspberry pi 3 B has a fixed i2c speed of 100kHz because of productions errors. I assumed that they have fixed it in the new version Raspberry pi 4, but of course there have been newer standards ...
1
vote
1answer
93 views

Is it safe to power 5V display from 3.3V line from GPIO?

I want to use I2C 20x4 LCD with my Raspberry Pi. It works when powered from 5V line of GPIO, but works also when powered from 3.3V line. I know that this display in fact is designed to work powered ...
3
votes
1answer
102 views

Raspberry PI as I2C slave - problem sending data back

First, I read Raspberry as an I2C SLAVE and followed everything in there. Great thread. However, this thread does not address anything about sending data back. This is the scenario: rPI4 as master, ...
1
vote
2answers
62 views

PN532 I2C read different Sectors with custom key

I am using the PN532 NFC Board. It's connected via I2C to my Raspberry Pi. I am looking for a library/Script which gives me any Sector of a Mifare Classic NFC card. I only can find the normal ...
0
votes
0answers
63 views

Can we implement a protocol other than spi on Raspberry Pi?

Pi supports SPI, I2C and UART by default. Can we implement any other protocol like MDIO into it? If yes, how do we do it?
0
votes
0answers
77 views

Why is i2c-bcm2835 trying to use GPIO pin 2

I am trying to understand, why is i2c-bcm2835 trying to use GPIO pin 2. As shown below. [ 4.256474] gpio-28 (ffffffff.i2c): enforced open drain please flag it properly in DT/ACPI DSDT/board file [ ...
1
vote
2answers
68 views

Rpi Controlling MPU9250 Accelerometer 20 Metres Away

I am doing a project which require an mpu9250 accelerometer to be connected to a Raspberry pi. Both are kept at a distance of 20m apart. What is the easiest way of data transfer without losses?
2
votes
4answers
80 views

Why is my relay switching on automatically when I start my program?

I'm building a little automated hydroponics system using a raspberry pi zero, a 5 volt relay, a pump and a soil moisture sensor from adafruit. So far everything is working, I can pull the pin to high ...
1
vote
0answers
22 views

Can we use pin 3 and 5 for rtc clock module and for detecting input from push button while both are connected?

I have my project where all the GPIO pins of raspberry pi have been utilized. Now I want to add an rtc clock module to the RaspberryPi. Pin 3 and 5 are already connected to the push button in input ...
0
votes
0answers
24 views

How to build and use the kernel of the Rpi I2C to 1-Wire Bridge DS2482?

Like the post on Oct 2013 by AnyNC I to would like to use the DS2482 module in a C program on my Pi but I'm unsure how and where to get further information on this. All the reply links to his post ...
4
votes
2answers
256 views

Proper way to bit bang I2C

As already mentioned in this question Reading and writing with smbus package, there are chips that, apart for standard SDA and SCL lines, use a third communication line. This means that this "...
1
vote
0answers
137 views

I2C devices on docker container

I am running a docker container on Raspberry Pi 3 and I am trying to read from an I2C device from the container. When I use i2cdetect inside docker I can see the devices. The run option I use is sudo ...
0
votes
0answers
38 views

SDA/SCL values of accelerator VALUES get affected when I use other pins

Essentially the SDA/SCL reads the I2C values of the accelerometer perfectly fine when no other pin on the pi is active. I have connected 4 drone propellers and whenever I give thrust to them by ...
0
votes
0answers
82 views

RaspiCam IVPort Dual Camera Multiplexer failure

I'm trying to design an RPi based system that should switch between two raspberry cameras. I just need to switch between the two cameras I don't need to mix their frames in any way. Moreover, in the ...
0
votes
0answers
49 views

Voltage amplifier for pwm output

I am trying to use the PCA9685 to power a regular desktop pc cooler fan, the idea being to later be able to freely adjust the fan speed depending on the pwm set in the pwm driver.(similar to this) On ...
2
votes
2answers
208 views

Multiple i2c with same address

I have tried to look in various foruns but couldn't find the solution for my problem. I'm trying to build a project where I have to use three VEML6070 sensors... These sensors obviously use the same ...
1
vote
0answers
142 views

Raspberry 3 model B v2 I2c slave, ESP8266 I2c master

I try to learn I2C with goal : read my ESP8266 events (I2C master) from my Raspberry 3 model B v2 (I2C slave). I use the Arduino Wire library on the ESP and python pigpio lib on the Raspberry. ...
3
votes
2answers
384 views

Rpi3B SSD1306 OLED I2C Interface Problem

I know there are similar questions, but none of them helped me out. I have a Raspberry Pi 3 Model B Rev 1.2 and Raspbian 10 installed. I try to connect an 0.91" Oled display (Hardware Details) which ...
2
votes
2answers
212 views

How can Rpi4B select multiple ADS1115 ADCs using PCA9546 / TCA9548A I2C multiplexer?

I have a PCA9546 i2c multiplexer hook to my raspberry pi under it are 4 ads1115 i2c ADC. My first main problem is how do you switch the address of the i2c in python the sample code that i have seems ...
0
votes
0answers
45 views

MMA845X Accelerometer outputs the same values constantly

This is my code: import time import Adafruit_GPIO.I2C as Adafruit_I2C import struct from math import * # Registers OUT_X_MSB = 0x01 CTRL_REG1 = 0x2A XYZ_DATA_CFG = 0x0E i2c = Adafruit_I2C.Device(...
0
votes
0answers
34 views

i2cdetect show bus is different every time

I am use ToF sensor(VL53L0X) on my Raspberry Pi's GPIO,I discover one problem about VL53L0X. I am input command i2cdetect -l It's show i2c-1 i2c bcm2835 I2C adapter I2C ...
1
vote
1answer
367 views

Is there an easy way to share the power and I2C GPIO pins between multiple sensors without soldering?

I'm trying to connect multiple sensors to the Power and I2C pins of the GPIO header of a Pi 3B, but I can't find an easy way to do it using the standard plug-in jumper cables that are often used for ...
0
votes
0answers
72 views

Connect two PCF8575 to I2C bus

I have two PCF8575 breakout boards that I would like to connect to my Raspberry Pi 3B+ running Debian Buster kernel version 4.19.75-v7. Since both have the same address (0x20), I need to create a new ...
0
votes
1answer
39 views

Choosing the pull-up resistor value for i2c that can cater up to n-number of modular devices

Hello i have designed a modular shield like value that uses the i2c buss of the raspberry but i do not know what resistor value for the pull ups to use. most guides tells us to use a safe 4.7k ...
0
votes
0answers
32 views

Customize i2c driver - Change i2c line speed

For the BCM2835, what I would like to do is the following: I want from the user space to be able to change the I2C bus line speed, not just by modifying the CDIV field of the DIV register (Reference), ...
1
vote
1answer
97 views

How can you use pigpio's set_servo_pulsewidth with an i2c address?

I've tried to use hexadecimal for the GPIO address to see if it would work with GPA0 on the MCP23017 import pigpio import time pi = pigpio.pi() gpio_num = 0x21 while True: pi....

1
2 3 4 5
12