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
3 votes
1 answer
628 views

Connecting Raspberry Pis With I2C

I would like to connect 6 slave RPis to 1 master RPi via I2C. Has this been done before and is it even possible. I know the I2C interface on the RPi has 1.8K pullup resistors so having all of those ...
user avatar
14 votes
3 answers
57k views

Safest way to connect Raspberry Pi to Arduino Uno R3

I am working on a robot using an Arduino Uno R3 and I wanted to have the ability of controlling the Arduino wirelessly, like stopping the Arduino without having to pull the power-plug every time. I ...
RPiAwesomeness's user avatar
2 votes
1 answer
4k views

MPU-6050 is not being detected by Raspberry Pi

I am trying to interface MPU-6050 with the Raspberry Pi, Since it require I2C connections so I have connected using the following pins: 3.3V connect to VCC SDA connect to SDA SCL connect to SCL ...
Sufiyan Ghori's user avatar
0 votes
1 answer
963 views

Control a SainSmart 20x4 LCD?

I've got some SainSmart 20x4 LCD left over from my Arduino projects and I wanted to check if and how it's possible to get them running with an Raspberry Pi. I've come across this question. ...
Norbert's user avatar
  • 119
8 votes
3 answers
25k views

I2C devices not detected

I'm running raspbian on my pi and followed this tutorial to get the i2c going. i2cdetect -y 1 used to detect my i2c devices but doesn't anymore. The sensor is connected like this: Could this be a ...
thommie's user avatar
  • 223
2 votes
2 answers
3k views

i2c data understanding [closed]

let me first say that I'm somewhat of a noob when it comes to i2c and serial communication. I've been trying for 2 days now to grasp it, reading datasheets, youtube videos etc. And I'm having a hard ...
G Thompson's user avatar
5 votes
4 answers
22k views

How can I automatically update the hwclock with NTP when I have internet connection

I'm using an RPi with Raspbian which runs the NTP-daemon by default. I have connected an rtc-ds1307 external i2c hardware clock. I was following the instructions given here to set it up: http://learn....
Thomas's user avatar
  • 81
4 votes
3 answers
2k views

Analog input to the PI

I have a bit of a specialized question for you. Recently I got my Pi up and running, and am amazed at what it can pull off. But I want more. I want to be able to record the output from an ...
user1003131's user avatar
5 votes
3 answers
2k views

Raspberry Pi/"Arduino" communication

I'm looking to use a raspberry pi to speak to multiple "arduino" ATMEGA328p ICs (through a logic-level converter). I figure I can do this reasonably well over the GPIO RX/TX and use qualifiers to let ...
Mark Brown's user avatar
5 votes
2 answers
7k views

How to install smbus to virtualenv?

How to setup python-smbus in the virtual env? Pip does not find any appropriate package. Is there a way to make main python installation's libraries visible to virtual env?
Darau's user avatar
  • 51
3 votes
3 answers
3k views

Raspberry Pi and BMP085 (I²C)

I tried to get the temperature and pressure with the BMP085 sensor and my Raspberry Pi (256MB) via I2C. I used this Adafruit tutorial: Using the BMP085 with Raspberry Pi, but this isn't working for me....
F481's user avatar
  • 171
2 votes
1 answer
2k views

HD44780 Character LCD C++ Library

I'm looking for a way to connect my Raspberry Pi Model B to my HD44780 LCD, I've tried the Rpi-hw C++ Library but to no avail. You can find the issue about it here. I've been looking ever since for a ...
user avatar
13 votes
4 answers
27k views

Meaning of cmd param in write_i2c_block_data

I am testing i2c communication between Pi and Arduino. The doc says: write_i2c_block_data(addr,cmd,vals) Block Write transaction. int addr,char cmd,long[] None I have this test: On Pi: ...
Gus Smith's user avatar
  • 133
2 votes
1 answer
2k views

I2C (via BCM2835 library) and a mysterious error

The main function I'm having a problem with is where I'm writing a value to external EEPROM. I clear the EEPROM, then write my value to it, waiting 100ms afterwards. #define BAUD_RATE (int)100e3 // ...
Scott's user avatar
  • 301
3 votes
2 answers
1k views

Connecting to an LCD via I2C

I'm trying to use a SainSmart 20x4 LCD connected via I2C. I can manually drive pins 0 & 1 to high and low so I know they work. I've commented the blacklist I2C-bcm2708 and blacklist SPI-bcm2708 ...
lolouk44's user avatar
1 vote
1 answer
6k views

What does UU mean for RasClock

I acquired a RasClock made by After Thought Software (http://afterthoughtsoftware.com/products/rasclock) . This is a real time clock using i2c. I wanted to play with its other features via i2c but ...
John Smith's user avatar
  • 1,251
9 votes
2 answers
23k views

i2cdetect doesn't catch ANY address. How can I tell if I2C working correctly?

I'm having difficulties interfacing the Raspberry Pi to basically any I2C sensor. I've gone through a lot of tutorials on how to get the I2C driver to work and my connections are correct. Still, ...
Ahmed Farid's user avatar
10 votes
2 answers
4k views

Controlling 400 LEDs from a raspberry pi

I have a client who has several large bronze signboards, each with 100-150 little light bulbs on it, totaling approximately 400 bulbs. The bulbs are turned on and off on a schedule, currently by hand ...
Moshe Katz's user avatar
3 votes
1 answer
9k views

I2C cable length and type

I have made some tests with a temperature sensor tmp102 connected with 1m long cables and it works great. Now I am wondering if I can use a 10m long cable and if yes, what type of cable shall I use? I'...
Penbeuz's user avatar
  • 143
1 vote
1 answer
7k views

How to get pin addresses on a MCP23017

Recently I purchased a few MCP23017. I've been reading up on them and I've gotten a few lights to turn on and such. I am having a problem trying to understand how to figure out the register address ...
Joe Jankowiak's user avatar
6 votes
2 answers
6k views

MMA8452 I2C module

I am working on Raspberry Pi Model B. I am trying to interface this device over the I2C Bus on the Rpi. My hardware Connections are: RPi Accelerometer Vcc P1_1 ------------------...
Jay K's user avatar
  • 248
1 vote
1 answer
490 views

Detect version 1 or version 2 Pi

I'm writing a small application that could run on version one Pi ( mine ) or a version two ( co-workers ) that uses the I2C bus. Since the I2C bus is different depending on the version, I was ...
Brian Brietzke's user avatar
0 votes
1 answer
2k views

Converting two's complement hex values to binary using PHP

I'm reading x-axis accelerometer data from an IC via the I2C bus using I2C-Tools' ( specifically i2cget ) in Linux. Here is the code that is reading these values: $OUT_X_L_A = shell_exec( 'i2cget -y ...
T. Brian Jones's user avatar
5 votes
0 answers
1k views

How can I read and write data to a Character Device File in Linux with PHP? [closed]

I'm trying to read and write to modules on the I2C bus on a Raspberry Pi using PHP. I'm using fopen() and fskeek(). Below is the code I've been trying to use to read data coming in from the physical ...
T. Brian Jones's user avatar
2 votes
3 answers
11k views

I2C: Raspberri pi as a Slave

I am trying to make two raspberry pi communicate through I2C protocol. I got little information that how I can code as a master in C using i2c-dev.h. So my question is how to make one of my raspberry ...
duslabo's user avatar
  • 191
1 vote
1 answer
2k views

Raspberry Pi on AVC-LAN / IEBus

I'm planning on using my Raspberry Pi in my car as an XBMC server. I'll be able to select songs/videos using the Android remote control app, but it occurred to me that it would be really neat if I ...
Nicholas Albion's user avatar
1 vote
1 answer
2k views

Connecting the HMC6352 compass module to a Raspi using I2C

I am trying to connect a HMC6352 compass module to my Raspberry Pi. According to the datasheet I need to send an "A" for a read command. However, I am somewhat new to I2C and do not know how to ...
jminardi's user avatar
  • 133
0 votes
1 answer
258 views

Variaty of sensors sitting on a single board for RPI

Is there a board that has a few different sensors sitting on top of it and able to talk to RPI via I2C/1-Wire?
abolotnov's user avatar
  • 952
1 vote
2 answers
2k views

I²C frequency changeable?

Is the I²C frequency meanwhile changeable? I read a few articles a while ago, that the frequency is not changeable.
ManuelSchneid3r's user avatar
2 votes
1 answer
453 views

Couldnt get any value from accelerometer

I am using accelerometer MMA766 to read values. Used the following commands root@raspberrypi:/home/pi# i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- --...
user5507's user avatar
  • 153
4 votes
0 answers
2k views

Xenomai RTDM Skins for I2C, SPI [closed]

In another post I read that Xenomai could be used for real-time tasks like control loops. I'd need to implement a real-time task which also talks to I2C and SPI. In this mailing list message I read ...
fabb's user avatar
  • 283
6 votes
2 answers
4k views

PREEMPT_RT and RPi Drivers

I'm planning to do some realtime control loop tasks with the RPi. In this post PREEMPT_RT and Xenomai were proposed. I'm thinking about trying PREEMPT_RT, as I'd like to keep it as simple as possible. ...
fabb's user avatar
  • 283
4 votes
2 answers
5k views

i2c Group on Arch

I'm trying to get I2C to run on Arch Linux with Kernel 3.6.11+ #352 PREEMPT with Raspberry Firmware from Jan 9, 2013 updated via rpi-update. So far I have got good results by just loading the i2c-dev ...
fabb's user avatar
  • 283
1 vote
2 answers
6k views

Configuring to read RTC at boot time

I have added an RTC to the I2C bus of the Raspberry Pi. If I follow the steps mentioned here (I am using the DS1307 RTC IC), I can run hwclock and read the time. root@raspberrypi:~# modprobe rtc-...
Lord Loh.'s user avatar
  • 657
2 votes
3 answers
10k views

I2C library for Mono/C#

Is there a library to use I2C bus on RPi for Mono/.NET? I was trying to find anything, but there are only libraries to work with GPIO but not with I2C.
Max Shmelev's user avatar
3 votes
1 answer
7k views

What is the difference between i2c-dev and i2c-bcm2708

I have been trying to figure out how to use i2c on RaspberryPi, and the What is the difference between i2c-dev and i2c-bcm2708 mentioned here? I would assume the i2c-bcm2708 module is specific to the ...
kevin's user avatar
  • 1,294
12 votes
4 answers
28k views

Is there an I2C Library

Is there a simple library to talk to I2C for C++? I have found some stuff for python and Java, but I wanted C++. I was hoping someone has ported the Arduino Wire library so I could use code I have ...
kevin's user avatar
  • 1,294
2 votes
1 answer
615 views

sample speed i2c

If running standard release of debian on my Rpi. How fast can I sample the sensor readings through i2c and save values? Why Im asking, I tried to read a DS18B20 and save it,s values (wrote the ...
Christian's user avatar
  • 1,230
9 votes
3 answers
410 views

Current state of I2C in Kernel and Kernel version in general

I need to use kernel drivers for some I2C peripherals, so I need kernel I2C support. As already discussed in a previous question, the current 3.1.9 kernel doesn't provide support for the SoC's I2C ...
Scolytus's user avatar
  • 414
13 votes
2 answers
18k views

How to use a DS18B20 temperature sensor in my Pi?

I have a few DS18B20 temperature sensors. These are normally used in Arduino projects, but I don't see why not to use them with a Pi. There is a software called DigiTemp that seems to drive the device ...
Tomas's user avatar
  • 273
15 votes
2 answers
25k views

How to make raspbian load the i2c-dev module on boot up

I have installed 2012-07-15-wheezy-raspbian, and the i2c-dev module and i2c_bcm2708 are there and work with i2c-tools. How do I get the i2c-dev module etc. to load at bootup?
John La Rooy's user avatar
  • 11.9k
9 votes
1 answer
5k views

How do I bit bang I²C master?

I've installed RPi.GPIO. It doesn't support I²C yet, but can I use it to bit bang I²C? I would just need the Raspberry Pi to be the master.
John La Rooy's user avatar
  • 11.9k
32 votes
4 answers
34k views

How can I use I2C to talk to sensors?

How can I talk to digital sensors over the I²C interface? Hardware: Which pins on the Raspberry Pi's GPIO can I use? Software: What I²C libraries are available?
Alex L's user avatar
  • 7,595
12 votes
1 answer
1k views

Is it possible to communicate with I²C devices via the GPIO? [duplicate]

Is it possible to communicate with I²C devices via the GPIOs? Also, are there any existing drivers or libraries that make this possible from Python?
Damian Powell's user avatar

1
12 13 14 15
16