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
1 answer
363 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 ...
1 vote
1 answer
394 views

TCA9548A I2C mux locking up after multiple reads

EDIT [solved]: This turned out to be noise coupling to the nRESET line and causing the MUX to reset. The RPi edges are sharp, and in this case the mux is on the other side of a ribbon cable, so the ...
0 votes
2 answers
215 views

What is the most basic way to talk I2C using Python on Raspberry Pi OS?

I can't manage to put together all the fragments of information I have found on this through searches. I have a new 3B and several I2C devices, including a PCA9685. The addresses are shown with ...
  • 101
6 votes
2 answers
3k views

Adafruit bonnet & adafruit-circuitpython-motorkit return "ValueError: No Hardware I2C on (scl,sda)=(3, 2)"

on the line kit = MotorKit(), the error diagnostic is: ValueError: No Hardware I2C on (scl,sda)=(3, 2) quality standards quality standards quality standards quality standards quality standards ...
  • 278
1 vote
0 answers
173 views

Max30102 not visible in i2cdetect

I'm trying to connect Max3012 to Raspberry PI. I actually tested: two Max30102 versions (?): one with 7 holes on one side and another one with 4 holes on one side and 4 holes on another AND, trying ...
  • 11
1 vote
1 answer
524 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 : ...
2 votes
0 answers
163 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 ...
1 vote
1 answer
2k views

Raspberry Pi 4 B I2C is enabled but does not work

I have a Raspberry Pi 4 B and I'm trying to set up in I2C Connection with an MCP23018-E/SP I/O-Port-Expander via GPIO02 and GPIO03. I have enabled I2c on the Raspi by: adding: dtparam=i2c1=on ...
  • 11
0 votes
1 answer
41 views

Deinitialize GPIO access on I2C channels

On webpage http://abyz.me.uk/rpi/pigpio/examples.html you can find Tiny GPIO Access that defines minimal set of C functions needed to control the GPIO without needing root privileges (it uses /dev/...
  • 429
1 vote
0 answers
242 views

I2C instability between a pair of Raspberry Pi

I have a connected a Raspberry Pi Zero (1.3, no W, running Raspbian 10 (buster) lite) as an I2C slave (clock:GPIO18,data:GPIO19) to a Raspberry Pi 3b (running Ubuntu 20.04.1) as an I2C master(clock:...
  • 133
1 vote
1 answer
415 views

Does enabling I2C disable the use of GPIO pins 2 and 3 (physical 3 & 5)?

I'm confused. I typically grab whatever GPIO pin is handiest when wiring components -- which is often GPIO 2 & 3. If I enable I2C but don't use an I2C component, can I still use GPIO 2 & 3? ...
  • 311
1 vote
1 answer
66 views

How to change bus number of NFC reader on pi [closed]

I am trying to build a NFC reader. I bought a PN532 and connected it to the pi with the diagram shown below. I ran the code below and got AssertionError:"Bus number must be 1 or 0". I then ...
  • 11
0 votes
1 answer
303 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 ...
  • 105
1 vote
1 answer
59 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-...
  • 71
5 votes
2 answers
547 views

Changing the baud rate of additional I2C busses

for some project I need 5 sensors. Their I2C address is fixed and can be changed to another fixed value by soldering. So without an I2C multiplexer (which I don't have), I need at least 3 I2C busses. ...
  • 81
2 votes
0 answers
482 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 ...
2 votes
1 answer
4k views

Enabling of I2C-0 via "dtparam=i2c_vc=on" on Pi 3B+ causes "I2C-10" & "I2C-11" to appear and disables GPIO 10 GPIO 11

For reference: I am using the latest release Pi OS Lite, Aug 2020 version. I am developing an application using Pi4J. I am referring to pins via this Pinout: https://pi4j.com/1.2/pins/model-3b-plus-...
2 votes
0 answers
48 views

How do i properly daisy chain two motor drivers that both provide power to the Pi zero-w? [closed]

I am using two waveshare dual motor drivers to drive a total of 3 motors with room for another one. The HATs can be placed on top of each other as they have adjustable i2c addresses. I am planning on ...
0 votes
1 answer
586 views

Cannot recognise i2c device

I appreciate this may be a duplicate question, but I have spent days working through answers to other questions and none work for me. Most similar questions predate the debian buster release, which I ...
2 votes
1 answer
568 views

BME280 Sensor Not Showing Up in i2cdetect

I have two components (one amplifier module and one BME280 from Adafruit) connected in parallel to SDA/SCL GPIOs on my Pi 4. However, when I run i2cdetect -y 1, only the address for the amplifier ...
1 vote
0 answers
240 views

i2c /IIC 20x04 lcd not displaying text

I have an 20x4 LCD and an i2c /IIC interface. If connected to the raspberry pi zero w, it looks the following: And from the back it looks like this: Interestingly, the power led of the icc/i2c ...
1 vote
0 answers
79 views

Can four UARTs plus either an SPI or i2c connection be used at the same time on a Pi 4?

Since using 5 UARTs at the same time on a Pi 4 is apparently not possible, is there any reason why 4 UARTs plus either an i2c or SPI connection at the same time (one or the other) would not work?
  • 143
2 votes
2 answers
378 views

RPi's I2C bus maximum device loading/fan out?

I have a RPi4 and I have been using the I2C bus with 4 MCP23017 gpio expanders and this works fine. My intention is to use 8 MCPMCP23017 devices, as they have only 3 bit addressing, this is the ...
  • 29
1 vote
0 answers
536 views

Most compatible 32-64 channel multiplexer for raspberry pi [closed]

I have been working on one sensor testing project. In this project, I have to detect or sense more than 60 sensors at a time with raspberry. I am looking for the most compatible 32 channel multiplexer ...
1 vote
1 answer
206 views

Can I stack multiple different HATs on RaspberryPi4?

I want to use multiple different HATs on the same Raspberry Pi. These are the boards I want to use: https://www.sparkfun.com/products/16328 https://www.seeedstudio.com/ReSpeaker-4-Mic-Array-for-...
0 votes
0 answers
32 views

elecrow sensors on i2c serial line

I have elecrow's sensors like this one that I want connect to i2c hub and use it based on the address. first I'm trying to set my pi 3b+ to recognize at least one of them connected directly. I'm on ...
  • 117
1 vote
0 answers
457 views

Device Tree for DSA with KSZ9897

I have a custom board with a KSZ9897 switch chip and a LAN7801 upstream. The KSZ9897 is connected to the Compute Module via i2c, and I can see it at 0x5f using i2cdetect. Everything appears to be ...
  • 179
0 votes
1 answer
253 views

Failing to read I2C data on LPG10 flow sensor using Python

I'm having some issues reading flow sensor data (Sensirion LPG10, to be precise) using the RPi Zero's I2C bus. I think I have set the bus and wiring up correctly as running 'i2cdetect -y 1' returns ...
1 vote
3 answers
498 views

How Can Rpi Interface The I2C Nintendo NES Game Controller with WII Remote?

so I bought this NES controller thinking I would be dealing with a 5-pin shift register but found that it was connected to a WIImote connector that appears to use I2C. I am trying to read its output ...
1 vote
2 answers
507 views

I2C not detecting PCF8574 [closed]

What is the issue here? LCD has backpack. Connected following schematic to Pi: I2C is not detecting adress of PCF8574: Things I have already tried: Reinstalling I2Ctools, ensuring I2C is turned on ...
  • 86
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 ...
  • 233
1 vote
0 answers
210 views

I2C, SPI and Python Libraries with Raspberry Pi 4b

I've been working with RPi.GPIO so far but I have had issues with PWM and edge detection, which are well known issues with RPi.GPIO, anyway, after some research I'm considering using a different ...
  • 86
0 votes
1 answer
53 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 ...
2 votes
2 answers
779 views

i2c communication problem with SSD1327 OLED display on a Pi 4

I have the following 128 x 128 OLED display: http://www.lcdwiki.com/zh/1.5inch_OLED_Module_SKU:MC01503 which is driven by a SSD1327 module. I'm trying to use this with a Pi 4 and the Luma.oled python ...
0 votes
0 answers
58 views

Connecting Pi to AVR with both I2C and ISP

So I'm attaching an ATTiny85 to a Pi Zero to build a variant of this WS2812 LED driver. The Pi talks to the ATTiny via an I²C/TWI interface. However, I also want to be able to update the software on ...
3 votes
2 answers
2k views

How can Rpi interface BME280 / BMP280 pressure and humidity sensor?

I have a BME280 sensor (this exact ebay item https://www.ebay.co.uk/itm/322638558861) wired directly with jumpers (not soldered) to a RPi B+. I have enabled I2C and installed the tools. The wiring is ...
  • 133
0 votes
0 answers
364 views

Default i2c not working in compute module

I am trying to communicate with the two i2c devices using the gpio pins 0 and 1 for the first device and 1 and 2 for the second device. I can communicate to the i2c device using the gpio pins 0 and 1 ...
0 votes
0 answers
321 views

Rpi 4 not booting after adding new i2c bus. changes made in config.txt

I made changes in config.txt to add a new i2c bus to connect a serial display as a temperature sensor is already connected to the default i2c bus. I took the following steps: Enabled i2c in Rpi ...
0 votes
0 answers
121 views

Activate SPI & I2C, deactivate serial console programmatically

To enable I2C and SPI interfaces and deactivate the serial console, you can use the raspi-config tool which works as expected. As far as I am informed, for SPI and I2C activation, the tool is just ...
  • 121
0 votes
1 answer
179 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" ...
1 vote
1 answer
521 views

Raspberry Pi shows all I2C addresses in use while nothing is connected

I've been building an autonomous boat with a raspi zero, and today I added a new i2c device. I first disconnected two other I2C devices I had attached. I then used i2cdetect -y 1 to verify that no ...
  • 277
1 vote
0 answers
576 views

Pigpio for I2C slave on Pi Zero and the timing of data from the master

I'm using the pigpio library through pigpiod running on a Rpi Zero configured as a slave. The master is an ATMega328PB. On the Pi I am testing using a modified version of the python script provided in ...
0 votes
1 answer
3k 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 ...
  • 412
2 votes
0 answers
138 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
2 answers
349 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-...
  • 11
0 votes
0 answers
789 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
2 votes
1 answer
354 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
0 answers
207 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 ...
  • 1
0 votes
1 answer
669 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
3 answers
302 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 ...
  • 117

1 2 3
4
5
16