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
2answers
74 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
82 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
26 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
318 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
174 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
39 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
116 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
275 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
180 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
428 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
277 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
47 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
38 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
381 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
88 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
45 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
39 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
120 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....
3
votes
3answers
575 views

GPIO vs I2C SMBUS2

This example scans for any I2C slave address current on the I2C bus. (I am using a RPi 3B+ with raspbian buster from september release) Script trial_smbus.py: from smbus2 import SMBus channel = 1 ...
2
votes
1answer
135 views

I2C works but gives wrong value

I have an RPi3b (Master) wired up to an MCU (Slave) communicating via I2C. I did have an RPi1b wired up and upon which I did my first development (cheaper to accidentally fry). Suddenly I'm getting a ...
0
votes
0answers
201 views

How do I read all registers of an INA219 sensor via SMBus in Python at once?

I'm trying to Connect my Raspberry Pi 3B+ with a Raspbian 10 to an INA219 current sensor (that also returns voltage and a premultiplied power) via SMBus in Python 3.7. After destroying one Raspberry ...
1
vote
1answer
218 views

Raspberry pi with 1.3" oled i2c screen

I'm currently trying to use this 1.3" i2c oled screen with the Adafruit oled i2c library, but I'm currently getting this issue: I have made sure to run the setup.py and all of the code is the same. ...
1
vote
1answer
273 views

i2cdetect shows all blanks or UU

I am facing a difficulty using MCP23017 with raspberry pi (stratodesk OS). I would like to know if I missed any configuration to get MCP23017 working my config.txt file: dtparam=i2c1=on, dtparam=...
0
votes
2answers
116 views

I2C Usage difference in Arduino and WiringPi

I'm using a device through I2C interface and I'm having some issues when the I2C bus fails, I don't know if it fails because an interferance in the cable or just timing issues in the Raspberry over ...
0
votes
1answer
423 views

Pi Zero W: Second i2c Bus

I did a really stupid mistake - I set up a second i²C bus months ago, so I have two gyro sensors connected - but din't document it. I can see the connected devices with i2cdetect -y 1 and ...
-1
votes
2answers
518 views

ImportError : cannot import name i2c

so I've recently set up my raspberry pi. Am following a tutorial for the MPU9250, from https://github.com/tuupola/micropython-mpu9250. I have did a install of the micropython-mpu9250, and tried the ...
0
votes
1answer
53 views

how can I know the current i2c speed?

I could not find this information anywhere. Where can I find the current i2c speed? It's not in dmesg, and in /sys/module/i2c_bcm2835/parameters/ I only have a file called "debug".
1
vote
1answer
881 views

WiringPi and ADS1115 C/C++ sample programs

I am trying to create c++/c program to AnalogRead using and ADS1115. I have seen that wiringPi has support for ADS1115 but i could not find any sample program to start with. Can anybody link guide me ...
0
votes
0answers
143 views

ADS1115 change i2c address and speed in python

Hello i am using a custom raspberry pi shield on my raspberry pi 4. Currently Im testing only 1 shield with 4 ads1115. In python im using adafruits library to read the data and it can only sample 50x ...
0
votes
0answers
75 views

i2cdetect detects the device but also shows a full row of addresses

I have successfully setup a RTC clock ( DS3231 ) on a RPi zero. The whole process was explained here. It works as expected but with only a minor difference: Row 5 is filled with numbers from 0x50 to ...
2
votes
1answer
34 views

How to securely share linux devices from client to another linux server

I have 3 I2C devices connected to my raspberry pi 3 i2c bus 1. I want to share this whole I2C bus 1 (/dev/i2c-1) to another linux server, which is running in the cloud, through a secure TLS, username ...
1
vote
3answers
228 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
98 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 /...
2
votes
1answer
134 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
107 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 ...
1
vote
2answers
452 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
596 views

Setting up multiple I2C buses using dtoverlay

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
179 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
25 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
903 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
266 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
139 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
92 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
97 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
437 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
72 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
67 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
41 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 ...

1
2
3 4 5
13