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
2k views

Error in installing i2c-tools

pi@raspberrypi:~ $ sudo apt-get install i2c-tools Reading package lists... Error! E: Unable to parse package file /var/lib/apt/lists/archive.raspberrypi.org_debian_dists_jessie_main_binary-...
0
votes
1answer
138 views

Ubuntu 20.04 'Focal' cannot find all I2C devices via i2cdetect; it get a few, though

This is puzzling me: I use Ubuntu 20.04 'Focal' on a RPI CM4. When I run i2cdetect -y 1 to list the connected I2C devices on /dev/i2c-1, I get a few addresses back that correspond to the custom PCB I ...
0
votes
0answers
22 views

Using multiple PCF8591 on one Pi

I'm trying to figure out how I can connect multiple PCF8591 chips to a single Raspberry Pi. As far as I can see, it has only one set of SDA and SCL pin(s). My eventual goal is; I have about 9 gas ...
1
vote
1answer
198 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 : ...
0
votes
1answer
42 views

Is there any way to communicate with the I2C with Java, without Pi4J?

With Pi4J, I can communicate with I2C with Java. But is there any way I can communicate with I2C with Java, without Pi4J. Just by using Linux internal...shell-ish...command? I want to read and write ...
1
vote
1answer
321 views

Rpi pico micropython ssd1306 OSError: 5

I have .91inch 128x32 pixel oled display. here im following Tom's Hardware tutorial here I'm using Thonny on windows 10 ive basically copy and pasted from Tom's hardware from machine import Pin, I2C ...
1
vote
1answer
50 views

Trying to debug why the magnetic sensor of my MPU9250/6500 Gyroscope Acceleration Magnetic Sensor won't connect via I2C but all the other sensors will

I am trying to debug why the magnetic sensor of my MPU9250/6500 9-Axis 9 DOF 16 Bit Gyroscope Acceleration Magnetic Sensor IIC/SPI won't connect to my Raspberry Pi 4+, but all the other sensors will. ...
0
votes
1answer
22 views

Raspberry Pi: How to check I2C Bus Busy Status in Multi-Master mode

I am working on the Wiring Pi I2C Example codes. In my case, I am using the 2 masters over the same I2C Bus. I am getting some errors like 0x00 + Missing ACK/NAK Even the Clock pulse is not in 50% ...
4
votes
2answers
329 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 -- -- -...
1
vote
1answer
181 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 ...
0
votes
0answers
21 views

i2c devices are detected, then dissapear

I have 4 MCP23017's connected to my Raspberry Pi 4's i2c bus all with different addresses hardwired via the address pins. Upon booting up, only two of them will be detected, and after about 5 minutes, ...
0
votes
1answer
2k views

Raspberry Pi 2 and SH1106 OLED

Abandoned post by Unregistered user. I am trying to get a cheap SH1106 1.3" OLED from eBay working with my Raspberry Pi 2. Frm the eBay description, it says that it supports "I2C/IIC ...
3
votes
1answer
2k 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 ...
2
votes
2answers
339 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? ...
1
vote
1answer
53 views

Fail to detect SPS30 particle sensor with I2C on Pi 3B

I have connected a number of I2C sensors (BME280 temperature, humidity pressure sensor, a TSL2561 light sensor and MLX90614 IR thermometer) to a Raspberry Pi 3 and they work fine. I am now trying to ...
1
vote
1answer
34 views

Fail to detect SPS30 sensor on Pi 3B I2C

I try to connect a Sensirion SPS30 Particle Sensor to my Raspberry Pi 3B via I2C. There are other sensors on the I2C Bus - and they work without any problems, but I fail to detect the SPS30. What I ...
1
vote
1answer
38 views

How would I go about to troubleshoot the ADS1115's inconsistent readings?

I have a ADS1115 breakout board from adafruit connected to my RPi 3B connected via I2C. It is powered via the RPi 3.3V pin. The A0 input to the ADC is connected to a sensor that will produce out-...
0
votes
1answer
28 views

Audio cuts out periodically when using audio hat

I am currently live streaming some audio to and from a raspberry Pi Zero W using the waveshare audio hat however I have found that the audio periodically cuts out when I do this. When I used my logic ...
1
vote
1answer
151 views

CM4 IO Board Fan I2C

I'm using Raspberry PI OS image is 2021-03-04-raspios-buster-armhf-lite and I spotted in the product sheet for the Raspberry PI CM4IO (Compute Module 4 IO board) that it was i2c-10 assigned for the ...
-1
votes
1answer
704 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 ...
0
votes
1answer
567 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:...
2
votes
2answers
75 views

Detecting an impact with a piezo sensor and ADC

I am trying to use piezoelectric sensors to detect when an object strikes one of 9 plastic panels. I have 3 ADS1115 ADCs (they are the QIFEI ones that actually are ADS1015), so 12 channels at 12-bits ...
5
votes
1answer
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 ...
3
votes
2answers
1k views

Pi cannot communicate with I2C sensor

I apologize my last post did not upload properly so I am creating a new question. I am using the CCS811 Gas Sensor with a Pi 3 Model b. I followed the steps on this page https://learn.adafruit.com/...
3
votes
1answer
1k 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 ...
0
votes
0answers
28 views

Why doesn't i2cdetect send any data over a secondary (dtoverlay=i2c-gpio) I²C bus?

I'm trying to add a second I²C bus to my Pi 3B by using two unused GPIO ports (BCM #6 and #26 resp. HW #31 and #37), so I added this line in /boot/config.txt: dtoverlay=i2c-gpio,i2c_gpio_sda=6,...
0
votes
1answer
1k views

Reading HX711 with 32 I/O Port Expander

I have successfully read a load sensor with an HX711 on the Pi with an online hX711 python library (similar to this). However, I am attempting to do the same on an 32 I/O Expander (specifically a ...
0
votes
0answers
41 views

Raspberry Pi Multiple I2C Interface Problem

I am trying to enable my i2c3 in Raspberry Pi 4 Computer Model B by adding the following to /boot/config.txt dtoverlay=i2c3-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=4,i2c_gpio_scl=5 However, ...
0
votes
1answer
283 views

{ [Error: , Remote I/O error] errno: 121, code: '', syscall: 'writeByte' } from raspberry pi to Azure

I tried to follow the instruction below to send sensor data from my raspberry pi 2 to Azure. Connect Raspberry Pi to Azure IoT Hub (Node.js) I connected the sensors to my pi device in a different ...
0
votes
1answer
128 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 ...
0
votes
1answer
720 views

Understanding struct.unpack code

Hello great community of helpers! We new programmers greatly appreciate your continuous help. Thank You! Can you explain this 1 line of code below... - Or break it down into separate chunks. I ...
0
votes
2answers
47 views

How can i2cdetect display all I²C addresses as used?

I've ran into a strange issue with the I²C port of my Raspi 3B: After connecting a TDA7318 audio mixer chip, some other I²C slaved were no longer recognised. So I disconnected the TDA to restore the ...
0
votes
2answers
23 views

Can I attach a TDA7318 running at 9 volts Vcc through I²C directly to a Pi 3B?

I've got a TDA7318 audio mixer chip controlled via I²C interface to be attached to my Pi 3B. The chip requires 9 V power for its operation amplifier circuitry. The datasheet of the chip does not ...
2
votes
1answer
58 views

I2C baudrate in Raspberry Pi, depends on arm core frequency

I'm using a Raspberry Pi 3, with a Raspberry Pi OS (arm64) official image to communicate with a PMBus compatible device (rpb1600-48 battery charger). I was experiencing communication problems. ...
0
votes
1answer
47 views

How can I change the I2C address of an Adafruit seesaw soil sensor by shorting the address jumper?

I bought a few of these moisture sensors -> https://cdn-learn.adafruit.com/downloads/pdf/adafruit-stemma-soil-sensor-i2c-capacitive-moisture-sensor.pdf?timestamp=1543968539 I have a few of them, so ...
2
votes
0answers
82 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 ...
2
votes
4answers
4k 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 ...
2
votes
2answers
117 views

How to avoid importing AdaFruit python modules such as “busio” and “board”?

I am using the "busio" and "board" module for this. I wanted to know if I can remove them and replace them with just the "smbus" module. Excuse the ignorance, but I am ...
0
votes
1answer
1k views

MLX90615 Sensor for Raspberry Pi 3 Model B

i have connected mlx90615 Thermometer module to my raspberry i2c pins but i was not able to find any code or guidance on how to receive measured temperatures from the sensor (i2c bus) but there are ...
0
votes
0answers
17 views

I2C lines doesn't work when the camera is enabled on Kernel 5.10

I'm using a Raspberry CM3L+ module on CM3-Panel hardware. This hardware works with no problem with the latest Raspberry OS (January 11th 2021). I tried to upgrade the OS to move to Kernel 5.10: sudo ...
0
votes
1answer
79 views

Gestures not working on FT5336

I'm new to the CM3+ module, but I've worked extensively with other RPi products. I'm currently trying to implement my own FT5336 driver, but I'm having some slight problems, as the "Gesture" ...
0
votes
0answers
142 views

difference between raspivid/raspistill and raspiraw HW access

Are there are fundamental differences in the way raspivid/raspistill and raspiraw access the camera HW. Browsing the code they all seem similar and use mmal components to process/display the images. (...
0
votes
1answer
25 views

raspbian and raspberry pi 3B+ [closed]

does raspberry pi raspbian had inbuilt I2C driver? or does that depend on the pi board? I am using raspbian as a OS in Raspberry 3B+. but the thing is whenever I run the code it will either show that ...
1
vote
1answer
37 views

Bitbang I²C to multiple slaves with same address

I want to use I²C to read several identical sensors with hardcoded addresses. Reading sequential is not an option. Neither is a multiplexer. Both for reading speed reasons. Is there any issue with bit-...
0
votes
1answer
2k views

I2C Programm stops running after a few seconds / Remote I/O Error nr 121

i have an Arduino Mega hooked as slave to the raspi via i2c. My python scripts looks like this import smbus import time bus = smbus.SMBus(1) SLAVE_ADDRESS = 0x08 def requestreading(): block = ...
0
votes
1answer
2k 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
1answer
45 views

How to send data from RPI to Arduino via I2C

Im working on a project to build an autonomous lego car. Im running into some problems here, and i could use some help. Right now, im struggling to send and receive data from RPI (4) to Arduino (Nano)....
0
votes
1answer
292 views

I don't know whether I have fried the I2C port on the Raspberry Pi 3 B

I am using a Raspberry Pi to send data to an Arduino Nano using I2C and it was working fine by just connecting the SDA, SCL and GND pins together from the Pi and the arduino. I then tried to get ...
0
votes
1answer
646 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
0answers
76 views

I2C not detecting BME280 (the I2C only version) when display is connected to SPI

I have bought an ePaper display and an BME280 sensor. The ePaper display itself is successfully powered via SPI (https://www.waveshare.com/wiki/4.2inch_e-Paper_Module_(B)) and the BME280 should be ...

1
2 3 4 5
14