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
2 votes
1 answer
545 views

I2C device address changing of MCP23017 I/O extender

When I connect all A0, A1 and A2 to ground, then my device address of the MCP23017 is 0x20 (constant). But when I disconnect the A0 from ground, then the device address is switching between 20 and ...
Jochem Gruter's user avatar
1 vote
1 answer
2k views

luma.core.error.DeviceNotFoundError: SPI device not found

I'm trying to setting up my new Dot Matrix MCU LED Display Module 8x32 with MAX7219 on my Raspberry Pi 3. I followed all the steps here https://max7219.readthedocs.io/en/0.2.3/ and of course using ...
ATO's user avatar
  • 11
1 vote
0 answers
360 views

DRV2605 + TCA9548A I2C Multiplexer gets sporadic "Remote I/O Error"

The setup is a raspberryPi driving two AdaFruit DRV2605s through an AdaFruit TCA i2c multiplexer and it all works correctly the bulk of the time. I adapted the sample Arduino code and by and large we'...
Jmc's user avatar
  • 111
0 votes
0 answers
622 views

Rpi not reading data from Sense HAT due to missing frame buffer

I'm having trouble getting my RPi 3 to listen to a Sense HAT. The Sense Hat is getting power and the RPI is aware of the Hat. pi@BBLPi1:~ $ ls /dev/i2c* /dev/i2c-1 pi@BBLPi1:~ $ i2cdetect -y 1 ...
Ben Downey's user avatar
0 votes
2 answers
253 views

Distinguishing data-addresses of I2C chips [case ADS1015]

I'm trying to learn reading out I2C chips, but somehow I can't figure out how to find the right data addresses. I bought a water level sensor and a ADS1015 ADC[foto below]. They are connected via ...
DA--'s user avatar
  • 223
0 votes
1 answer
2k views

Problem using RTC using ds3231

Trying to get an RTC to load at boot. I've enabled i2c, that works fine for other components. /etc/modules contains: snd-bcm2835 i2c-bcm2835 i2c-dev rtc-ds3231 /etc/rc.local contains: echo ...
zotty's user avatar
  • 101
2 votes
1 answer
4k views

Reading Multiple bytes in Raspberry Pi over I2C using Wiring Pi library [closed]

0 down vote favorite I am trying to build one sensor interface using Raspberry Pi over I2C. I have installed WiringPi. I am seeing limitations of wiringPi library, that supports only 1 or 2 bytes I2C ...
shivakumar's user avatar
0 votes
1 answer
1k views

How to write a single bit on a I2C/smbus register

I have a MCP23017 GPIO expansion chip connected to a Pi via the I2C bus. I want to be able to treat the pins of the chip like the GPIO pins of the PI – turning them on and off individually. ...
toomanydaves's user avatar
0 votes
1 answer
178 views

How to I check and confirm if one's Pi 3's "Raspbian kernel" supports I2C on additional GPIO pins?

The June 4, 2018 Instructables article Raspberry Pi Multiple I2C Devices by Jacco Slabbert says The latest raspbian kernel support the creation of multiple I2C busses using GPIO pins. See also in ...
uhoh's user avatar
  • 562
0 votes
0 answers
50 views

Raspberry Pi3 connection I2C

I am looking to connect an external battery to my Raspberry and know its level of charge. For that, I have to use a SMBus connection, so I can use the I2C ports of my Raspberry. But I can not recover ...
Mathieu Sollier's user avatar
-1 votes
2 answers
298 views

How to connect more I2C sensors on top of a RPI shield

I'm struggling with a problem, how to connect more sensors on top of this raspberry shield => https://sixfab.com/product/raspberry-pi-nb-iot-shield/ The shields schematic can be found here and it ...
Jack M.'s user avatar
  • 99
1 vote
2 answers
1k views

Cannot Detect LIDAR Lite v3 Raspberry Pi 3B+

I am trying to connect my Garmin LIDAR Lite v3 sensor to my Raspberry Pi 3B+ via i2c interface. However i2cdetect on the command line returns dashes for every address. I'll try my best to clearly ...
ZooHe17's user avatar
  • 33
2 votes
1 answer
2k views

Can the i2c baudrate be changed on the fly without a reboot?

With the new device tree on my Raspberry Pi 3B+, the i2c baudrate gets set in the /boot/config.txt. Is it possible to set this on the fly instead? I have a device (DAC8574) that needs some initial ...
rprr's user avatar
  • 101
0 votes
2 answers
500 views

I2C Primitive Sunfction for Python & Pi

Well-versed in C/C++, but new to Python. I have done a lot of research here and maybe I am missing something, but it seems that Pi/Python does not have primitive functions for I2C, which is sad to ...
Pedro's user avatar
  • 1
0 votes
1 answer
424 views

Serial connection with raspberry pi to arduino, works only once and needs a hard reset every time

so I am working on a project where I have to connect an arduino to the raspberry pi through serial and then transfer the input from the raspi to another I2C device. So, just to test things out and ...
Fr1nge's user avatar
  • 11
1 vote
1 answer
567 views

Connecting raspberry pi with ev3 using i2c

Recently, I have been trying to build a project where I need to connect an ev3 to a raspberry pi. I have decided doing it by i2c after reading (and successfully replicating) an article about ...
Fr1nge's user avatar
  • 11
0 votes
0 answers
297 views

Cheap 128x64 OLED

I purchased two cheap OLED modules, one is 0.96" 128x32 I2C at the following link: https://www.amazon.it/gp/product/B06XRBTBTB/ and the other is a 2.4" 128x64 at the following link: https://www....
user2959923's user avatar
1 vote
2 answers
3k views

WiringPi Library and PCA9685 throwing errows

I am using this example code PCA9685 in C and whenever I run the code I get this as my output: PCA9685 servo example Connect a servo to any pin. It will rotate to random angles pwmWrite: You have ...
lauro199471's user avatar
0 votes
0 answers
173 views

Parallax MS5607 and Raspberry Pi 3?

I am trying to connect the MS5607 to the Raspberry Pi via I2C. I can confirm that it connected when I run sudo i2cdetect -y 1. I then went ahead and tried to use rsolomon's python code. First error I ...
Sailanarmo's user avatar
0 votes
0 answers
273 views

How to read data from PIR sensor which is controlled by relay i2c?

There are my first steps with RPi and i2c. I use expander pcf8574 and I would like to drive a relay to control LED and PIR sensor. When the state on sensor is HIGH, LED should be turn on. I wrote a ...
adrian0808's user avatar
0 votes
0 answers
352 views

unable to set i2c speed for raspberry pi 3

I found several tutorials online on how to change the I2C speed on RPi3. They all boil down to this one. The script does work and I do read a 400000 value. However when I look at the scope my ...
flashburn's user avatar
  • 173
1 vote
1 answer
2k views

What does Pin Base mean in WiringPI Library?

I cant seem to find a clear answer what "pinBase" does. Does anyone have an idea what it does? Thanks! Code node = wiringPiNewNode (pinBase, 8) ; Function struct wiringPiNodeStruct *...
lauro199471's user avatar
3 votes
1 answer
1k views

Can I enable I2C before first boot?

I want to enable the I2C interface, but without having to boot, login, and the whole sudo raspi-config. I tried editing /boot/config.txt right after sudo dd the image to the disk, still in my main ...
regisin's user avatar
  • 73
1 vote
2 answers
1k views

Rpi interfacing MCP4725 12-bit DAC pproblem

I am using raspberry pi 3. I am trying to run the AC induction motor for that I want an analog pin. In raspberry pi model doesn't have an analog pin. All pins are digital IO pins. So I have tried MCP ...
uvan's user avatar
  • 13
0 votes
1 answer
2k views

i2cdetect -y 0 | 1 does not detect active i2c module(s)

I'm trying to verify that I2C is enabled on my Pi 3 B. Here's what I've done so far. Any help would be greatly appreciated. $ uname -a Linux rpi3b2 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 ...
Farad'n's user avatar
  • 129
1 vote
1 answer
1k views

Selecting GPIO pins for multiple MCP4725 DACs

I'm doing a project in which I need to use DAC-s to conduct voltage to dimmers to switch appliances on or off. So far I've used Adafruit's guide and it worked fine. I got the I2C working and sudo ...
slartibartfast's user avatar
-1 votes
1 answer
3k views

Android things - Raspberry pi 3 model B, raspi-config command not found

I have searched for the solution before posting this question. I've flashed Android things OS on my SD card mounted to Raspberry Pi 3. Now I want to configure MPU6050 to access Gyroscope and ...
Suhas's user avatar
  • 33
0 votes
1 answer
229 views

SDA1 gpio test reports 0 when nothing is connected and i2cdetect -y 1 detects all addresses active?

I am fairly new to raspberry pi so if I am not providing enough information please let me know. Im working with a new Raspberry Pi 3. My issue is that the command i2cdetect -y 1 is returning all ...
David Brenes's user avatar
0 votes
0 answers
806 views

Controlling 30 LEDs with 2 PCA9685 boards - need to increase performance

I have a Raspberry Pi 3 and two Adafruit PCA9685 interfaces with which I am trying to control 30 white LEDs. Currently, I am using Python and Adafruit's module, this works fine, however, with the ...
Bert's user avatar
  • 103
0 votes
0 answers
260 views

Pimoroni Speaker Phat i2c and using the pins

Is it possible to use the pins on top of a raspberry pi hat that uses i2c? I am trying to use the Pimoroni Speaker Phat and control a motor using GPIO at the same time. Thanks for any replies.
Daveyman123's user avatar
0 votes
1 answer
262 views

i2c Permament ownership setting

I set up an apache2 server on my RPi zero and written cgi script that reads temperature from database and prints it onto a website. To update data in the database, I have a small python script which ...
Surcouf's user avatar
  • 33
1 vote
1 answer
1k views

pigpio bitbang i2c returns random data, smbus is OK

The scripts and the results mostly speak for themselves. smbus returns good data when I use the standard I2C GPIO pins, but the pigpio bit banging I2C returns what looks like random data. What might ...
uhoh's user avatar
  • 562
1 vote
1 answer
6k views

The command sudo i2cdetect is not recognized

When I try to use "sudo i2cdetect -y 1" it comes back with unknown command. I turned on i2c do I need to download any new software?
Geoff Seabrook's user avatar
0 votes
1 answer
1k views

Strange return from pigpio i2c_read_device

I am using an air quality sensor with an I2C interface (datasheet: https://docs-emea.rs-online.com/webdocs/14cd/0900766b814cdbb8.pdf). When running the below code asking for less than 8 bytes I get ...
Unfitacorn's user avatar
1 vote
1 answer
4k views

RPi 3 with I2C as a slave, can be read by the master? [closed]

RPI 3-B, working in pyton with PIGPIO as a slave I2C device, can be read ? I'm actually using RPi as a i2c slave, master can write on it and RPi reads the buffer successfully. But could I write ...
Pere SG's user avatar
  • 11
0 votes
1 answer
820 views

combining sound card and ADC (I2C)

Am thinking of using an Audio Injector sound card, which apparently has a two-channel high-precision ADC. In addition I will be needing to read two different variable resistances. One of these has two ...
Tomas By's user avatar
  • 218
1 vote
1 answer
728 views

PN532 I2C Connection not working

I have connected my Raspberry Pi 3b to a PN532 NFC reader using the I2C interface. I am using the red version 3.0 board. I have set the switches: 1 to on, 2 to off, as according to the table for I2C. ...
Vilsol's user avatar
  • 111
0 votes
2 answers
1k views

Enabling Second I2C BUS Causes crash

This is the price I pay for being greedy, While working through the book exploring raspberry pi by Derek Malloy (an excellent book for understanding embedded Linux), When I append bcm2835....
Niko_Jako's user avatar
-1 votes
1 answer
338 views

i2c dtoverlay bus number

I need to add 2 additional gpio buses. I'm using the usual i2c for a port expander and also need to read/write two different external eeproms that need to be plugged in on different pins. Adding a ...
stardustJerry's user avatar
3 votes
1 answer
3k views

Bit-banging with Python

I want to get and change the I²C address of MCP4728 chip. To do this, one has to coordinate I²C communication with another LDAC pin register. After posting the question here, Reading and writing ...
Pygmalion's user avatar
  • 458
1 vote
1 answer
2k views

smbus/I2C sensor returns fixed data

I am attempting to use a sensor in conjunction with a raspberry pi smbus. When I try and read a specific byte of data, it returns 181. No matter what byte you tell it to read it returns 181, ...
wye_mine codebase's user avatar
2 votes
3 answers
3k views

Reading and writing with smbus package

I am trying to read/update I2C address of a device. However, in order to do that during the communication state of pin LDAC has to be changed, as shown in the manual: Is that possible to do with ...
Pygmalion's user avatar
  • 458
0 votes
2 answers
913 views

Connect multiple concurrent MCP23017 to Raspberry Pi

So I want to control multiple (12) RGB LEDs using the raspberry pi. I have 6 connected to the GPIO ports on the pi itself and want 6 connected to 2 MCP23017. I cannot seem to get them both to show up ...
Elliot Moore's user avatar
0 votes
1 answer
349 views

What libraries/code to I need to use a MyoWare muscle sensor with a Raspberry pi?

My robotics class is trying to take signals from a MyoWare Muscle Sensor and feed them to a Raspberry Pi Zero. For ADC, we are using a MCP3008 chip. Because most people use Arduinos for these sensors,...
Johnny Dollard's user avatar
0 votes
1 answer
3k views

BCM.GPIO and BOARD.GPIO

For a school project I wanted to use a 128x64 OLED i2c OLED screen and a RFID reader. I tested everything separate and it worked, but when I wanted to join everything in my main program it failed, ...
DwarfNebula's user avatar
1 vote
1 answer
2k views

Taking input from a MyoWare muscle sensor with a Raspberry Pi Zero

Our robotics class is making a robotic hand that takes input from muscle sensors. We have a Raspberry Pi Zero and are trying to take muscle activity input from a MyoWare Muscle Sensor. The program we ...
Johnny Dollard's user avatar
-1 votes
1 answer
334 views

How to connect PCF8951 with Raspberry Pi

I want to connect PCF8951 with Raspberry Pi I'm following: 1: https://www.sunfounder.com/learn/sensor-kit-v2-0-for-raspberry-pi-b-plus/lesson-13-pcf8591-sensor-kit-v2-0-for-b-plus.html But when using ...
เพชอน เพชอน's user avatar
2 votes
0 answers
626 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
997 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
357 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

1
7 8
9
10 11
17