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.

241 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7 votes
2 answers
2k views

GY-521 module / MPU-6050 3x Accelerometer not detected by i2cdetect

I got this GY-521 module (https://www.aliexpress.com/item/MPU-6050-3-Axis-gyroscope-acce-lerometer-module-3V-5V-compatible-For-Arduino/2035920870.html?spm=2114.13010608.0.0.pRpLS4) and no matter what ...
Johnny Tordgeman's user avatar
6 votes
0 answers
296 views

Raspberry as I2C Slave, how to slow down transfer rate?

I have had minor success using the PIGPIO library and interfacing the Pi as an I2C Slave (Using GPIO Pins 18 and 19 as SDA and SCL) with a Campbell CR1000X Datalogger I am encountering a problem ...
HelpMeImDumb's user avatar
6 votes
2 answers
389 views

MMA845X accelerometer mapped at 1C

I have a MMA845X accelerometer mapped at 1C: 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- 1c -- -- -...
Cosmin Mihai's user avatar
5 votes
0 answers
784 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 ...
Wh0Els3's user avatar
  • 51
5 votes
1 answer
2k views

How do I add an i2c device to the device tree?

I am trying to add an mpu 9250 to the device tree of my RPi 3 A+ so that my custom driver's probe function will be called. I have followed this documentation about the Raspberry Pi device tree and ...
gabson's user avatar
  • 69
3 votes
2 answers
350 views

Raspberry PI 4 B 8Gb running 2 ov9281 cameras with camarray hat: ERROR: *** no cameras available ***

I have a Raspberry PI 4 B 8Gb. I have this kit (2 ov9281 cameras with camarray hat): https://www.uctronics.com/arducam-1mp-2-stereoscopic-camera-bundle-kit-for-raspberry-pi-nvidia-jetson-nano-xavier-...
fghoussen's user avatar
  • 129
3 votes
0 answers
879 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 ...
Theo's user avatar
  • 31
3 votes
0 answers
296 views

I2C windows iot can't connect

I'm trying to communicate between a Raspberry Pi 3 running Windows 10 IOT (build 14376 insiders) and a T-REX Manual here using I2C protocol. The thing is that it always crashes, so after some ...
Sven Borden's user avatar
3 votes
1 answer
3k views

How to specify the I2C device address in Libnfc?

I'm using Libnfc 1.7.1 on a Raspberry PI. I'm connecting to a NXP PN532 chip via I2C and configured the connstring (pn532_i2c:/dev/i2c-1) in the Libnfc config file accordingly. So far, everything is ...
a.Dippel's user avatar
3 votes
0 answers
265 views

I2C device detection on Pi A+

Good evening, I am trying to link a digital thermo sensor (MR003-001) to the I2C pins on A+ Pi. I have enabled I2C connection in raspi-config, and download I2CdevTools. user is in i2c group, I ...
Raphaël's user avatar
2 votes
1 answer
177 views

Struggling with I2C devices

I had 2 devices connected using I2C on my Rasp pi 3b. A clock RTC8563 and a humidity sensor AHT20. Both were working. I mucked about with the wiring, and did something wrong, as I smelled smoke before ...
pir8ped's user avatar
  • 129
2 votes
0 answers
2k views

Raspberry Pi 4 - I2C scan extremely slow and not working

I am using a Raspberry Pi4 - 4GB (exact model: Raspberry Pi 4 Model B Rev 1.4) with following configuration: AME="Raspbian GNU/Linux" VERSION_ID="11" VERSION="11 (bullseye)&...
Marco Bobinger's user avatar
2 votes
2 answers
1k 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 ...
hannes ach's user avatar
2 votes
0 answers
703 views

Raspberry pi 4 doesn't detect i2c devices

I am working on a gas flow sensor SFM4100. It's communcation protocol is i2c. And according to gasses bus adresses are changing. For o2 gas, address is 2. When I connected the all pins according to ...
noobinmath's user avatar
2 votes
0 answers
230 views

Stacking up multiple grove base HATs on Raspberry Pi

I want to stack multiple Grove base HATs on a single Raspberry Pi. This is the HAT i am using https://wiki.seeedstudio.com/Grove_Base_Hat_for_Raspberry_Pi My application needs to interface 24 analog ...
vijayakumar sargunam's user avatar
2 votes
1 answer
681 views

PCA9685 Raspberry pi4B i2c errors

I am trying to get a raspberry pi 4 model B working with across IC2 to a PCA9685 servo motor controller board. I have followed various tutorials e.g: PCA9685 Tutorial Using the libraray : ...
Jamie Nicholl-Shelley's user avatar
2 votes
0 answers
225 views

I2C device detected on arduino and raspberry pi 3 but not on raspberry pi 4

I have a fresh installation of raspbian (Linux raspberrypi 5.4.51-v7l+ #1333 SMP Mon Aug 10 16:51:40 BST 2020 armv7l GNU/Linux) on a raspberry pi 4. I have enabled i2c and nothing else. I have ...
Yanick Salzmann's user avatar
2 votes
0 answers
643 views

adafruit_drv2605 AttributeError: object has no attribute 'try_lock'

I am using a Texas Instruments DRV2605 to drive some haptic motors. I am using the Adafruit library here to communicate with the DRV through Python. I need to set some bit registers of the chip but ...
Bassline Soup's user avatar
2 votes
0 answers
1k views

Communicate via I2C using an 8-Bit Bidirectional (TXS0108E)

I want to communicate through I2C between a Raspberry Pi 4 and an ATMega4809 (Arduino Nano Every or Curiosity). Since SDA/SCL pins in Raspi Pi are 3.3V and in ATMega4809 are 5V I thought I had to use ...
Miguel's user avatar
  • 233
2 votes
0 answers
149 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 ...
user2434545's user avatar
2 votes
0 answers
97 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....
Prateek Singh's user avatar
2 votes
2 answers
2k 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 ...
Gábor Fehér's user avatar
2 votes
2 answers
724 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? ...
user3435167's user avatar
2 votes
0 answers
601 views

Using I2C with the SenseHat

I'm working on a project that involves getting data from a SenseHat and transferring it via I2C to a arduino. I have managed to get the RPI and Arduino communicate without the sensehat but as soon as ...
jakebacker44's user avatar
2 votes
0 answers
992 views

Enabling I2C resulting in error Raspberry Pi

I am trying to use MPU 6050 on raspberry pi. For that I enabled i2c on raspi. But after that whenever I am trying to check the modules on my Python 3 or 2 shell for e.g. when I run help('modules'), I ...
ArkanSaaS's user avatar
  • 121
2 votes
0 answers
355 views

Any GPIO library that supports I2C multi-master mode?

I am thinking of joan's PIGPIO library but I am aware there are others for the RPi, and I was wondering whether there are any that support multi-master I2C mode? As far as I can tell {see here} this ...
SlySven's user avatar
  • 3,621
2 votes
0 answers
2k views

Controlling 3 axis brushless gimbal motors

I am new to using the Raspberry Pi 3 and trying to control brushless gimbal motors with encoders to "look around" Using I2C, I have gotten them to read its orientation from BaseCam's Simple BGC GUI. (...
tam's user avatar
  • 81
2 votes
0 answers
459 views

Ruby - I2C - pi_piper - How to use 4x20 LCD display? - HD44780 with PCF8574 converter

Anyone know how I can get use pi_piper gem to use 4x20 LCD display (hd44780) with I2C converter (PCF8574). I'm totally noob in this part of programming. I tried using ruby-i2c-devices gem, but ...
BenyL's user avatar
  • 21
2 votes
0 answers
743 views

Random IO errors on i2c

I connected a raspberry to a i2c bus that holds two devices: an i2c io expander pcf8574A at 0x20, and a lcd controller pcf8576 on address 0x38. Both show up fine when running i2cdetect -y 1. When ...
JayTaph's user avatar
  • 121
2 votes
0 answers
305 views

i2c random write failures errno 5

I have a panel of 6 Rainbowduinos. Each Rainbowduino has an 8x8 tricolor LED panel with a ATMega chip that you can program just like a regular Arduino. I have a master Arduino that drives it as a ...
ktf's user avatar
  • 21
2 votes
0 answers
654 views

I2C and camera issues

Is there any known issue by using I2C components and the RPi Camera at the same time? I am using: Raspberry Pi B+, running Raspbian (updated and upgraded to the latest versions) MPU6050 3 Axis ...
user avatar
2 votes
0 answers
3k views

Why I cannot read the temperature / humidity sensor SHT20?

I use a temperature and humidity sensor sht20. According to this link: http://www.sensirion.com/en/products/humidity-temperature/humidity-temperature-sensor-sht2x/ It is compatible with sht21, which ...
Tom Xue's user avatar
  • 241
2 votes
1 answer
5k views

Daisy Chaining MCP23017 & Addressing

I'm looking to daisy chain multiple MCP23017 chips (upward of 10) to essentially give me more IO to play with from my Pi. I've started to work on the circuit diagram, but I'm really lost with all ...
gunnarain's user avatar
2 votes
0 answers
2k views

Why is my RTC DS1307 not being recognized?

I'm trying to wire up a DS1307 RTC to my Model B Pi. I'm following the diagram as shown in this crude image and I've also tried it like this but it isn't recognized by the Pi. When I run i2cdetect -...
DustinDavis's user avatar
1 vote
0 answers
79 views

PCA 9685 i2c communication issue

I would like to ask a question regarding the usage of secondary channel of i2c in rpi 4b. I have enabled the secondary channel through adding "dtoverlay=i2c-gpio,bus=2,i2c_gpio_sda=22,...
user153780's user avatar
1 vote
0 answers
33 views

I2C 1 light at a time`

i am currently using the NCP5623 (I2C LED Driver) to light up my 5V 1A (as written on the box) RGB LED strip. i followed the sample connection as shown on the datasheet of the NCP5623 and when i ran ...
seonghwife's user avatar
1 vote
1 answer
565 views

Changing I2C pins through /boot/config.txt failed

I'm trying to get the libcamera-still to work on a compute module 4 with an imx219 but I'm getting a ERROR: *** no cameras available *** Running dmesg returns [ 6.060283] pinctrl-bcm2835 fe200000....
Max's user avatar
  • 121
1 vote
0 answers
449 views

BME280 sensor on I2C 0 stopped working after adding another one on I2C 1

I have two similar BMP280 sensors. First, I connected one of them to GPIO 16, 17 (SDA, SCL) as well as 3V3 and GND. I ran the following script in MicroPython to read temperature and other measurements:...
Manuel Popp's user avatar
1 vote
1 answer
1k views

PN532 with Raspberry Pi Pico

I have PN532 NFC Module that looks like this I am trying to connect this NFC Module with Pico, but I have no luck in finding library that allows me this. What can I do to control it? Can you ...
M.Simel's user avatar
  • 23
1 vote
1 answer
78 views

PI4 Won't boot green led flashes 3 long 3 short I2C error

Everything was fine with my pi4 until yesterday that didn't boot. I checked the led lights and gives me 3 long and 3 short flashes. I checked in the docs https://www.raspberrypi.com/documentation/...
Jesus Lobo's user avatar
1 vote
1 answer
96 views

ServoMotor I2C module

I want to control a ServoMotor with THIS module: I asked a question before in THIS topic. And as you can see in the topic, they guided me perfectly. And they said I should use THIS code. But I have a ...
Reza Gholipour's user avatar
1 vote
0 answers
131 views

Why does my Raspberry unable to detect fan through i2c?

I recently bought a Argon One V2 M2 house for my Raspberry Pi to speed things up and have it cool, but the issue is i2c shows all addresses. After some research figured it means either a circuit issue ...
Marcell's user avatar
  • 111
1 vote
0 answers
285 views

Can `i2c-mux` be applied to `i2c-0`?

I have a Pi with i2c-0 working fine and seeing addresses. I'd like to use a I2C multiplexer on i2c-0. Using a I2C multiplexer on i2c-1 is very easy by having this in /boot/config.txt... dtparam=...
papakpmartin's user avatar
1 vote
1 answer
173 views

i2c address not detected while trying to use Adafruit VL53L0X Time of Flight Distance Sensor

I have a Raspberry Pi 4. I am using the Adafruit VL53L0X Time of Flight Distance Sensor. I have connected a T-Cobbler to a breadboard and attached that to my Raspberry Pi. The sensor is wired ...
Via Iseppon's user avatar
1 vote
0 answers
86 views

Is it possible to connect multiple USB devices to the I2C bus on RPI?

I want to control lots of USB devices from a single Raspberry Pi. So far I have only tested with RPI4 and I could only connect about 5 devices concurrently. The limitation is caused first by the fact ...
Iain Dooley's user avatar
1 vote
0 answers
416 views

Transmit a string from one Pico to another Pico via i2c using Micropython

I want to transmit a string from one pico to another pico via I2C protocol , but I some how cant find a way to do it , my I2C scan function doesnt seem to detect another pico at all, is there a way to ...
Mohith Tallam's user avatar
1 vote
0 answers
47 views

Can i use a I2C PWM expander as a Digital output module?

i want to use a "IS31FL3731" I2C PWM expander to dim my LED Strip. This expander does have a lot of PWM outputs and i also need a lot of Digital outputs. So is it possible to use a few PWM ...
manintree's user avatar
1 vote
1 answer
60 views

I2C Interfacing with HIH6130

I'm trying to read data from sparkfun's HIH6130 Breakout for measuring humidity and temp data. Following this instructable (though without the i2c shield for the pi), the provided python code just ...
Cameron Fuller's user avatar
1 vote
0 answers
194 views

How do I configure the Raspberry Pi Zero with appropriate parameters to run the TI DLP2000EVM DMD?

I've followed the best tutorials online but to no avail. In particular, one thread on TI, to which I cannot post or ask questions, and one written for the raspberry pi 3B+ which references the ...
Randall Meyer's user avatar
1 vote
0 answers
494 views

Problems Installing ssd1306 library on rpI pICO

Using Manage Packages in Thonny I had successfully installed the ssd1306 library onto my Pico and had the OLED working successfully. When showing a student how to download the library I got the ...
Fred's user avatar
  • 11

1
2 3 4 5