Inter-Integrated Circuit (I²C) is a bus for low speed peripherals. Use this tag for questions regarding how to use I²C with an Arduino, or for problems with I²C and your Arduino.

learn more… | top users | synonyms

0
votes
0answers
3 views

I2C communication between 2 arduinos with updated wire library

So I would like to communicate between two Arduino 101. From what I have read, the best method is to use I2C with use of the wire library. However, it seems as though the newest Arduino IDE has an ...
0
votes
1answer
9 views

How could I display a iRC Chat on a Arduino i2c LCD

OK so how could I go about putting a iRC chat on a LCD? I'm kinda new to arduino and LCDs and this seems like a cool project to do :)> -Thanks Here is code I'm using to display stuff on the lcd ...
0
votes
1answer
18 views

Accelerometer Z Value off a significant amount, all other values reasonable

I'm using the MPU9255 Accelerometer to measure acceleration in the X,Y, and Z directions. As per the datasheet, I've applied a scaling to the raw digital values based off of whether I specified +- 2G,...
0
votes
0answers
19 views

Analog instability while switching outputs, including I2C bus

Arduino ADC I2C Issue Brief Arduino reading analog 0-10VDC as fast as possible, and switching/flashing outputs at various set-points. Method 1 Tried using standard analog in with a voltage ...
0
votes
1answer
14 views

Arduino i2c communication between another arduino and a sensor

Can the following scenario exist? Microcontroller 1 sends a code to microcontroller 2 to start reading sensor data. Then Microcontroller 2 reads sensor data from sensor and sends it back to ...
0
votes
0answers
21 views

Arduino and VS1053 gets stuck in random conditions

I've been writing some code to make a MP3 breakout play a specific sound when receiving a I2C message. For some reason it gets stuck on random conditions and I have failed to debug it. Any thoughts ...
0
votes
1answer
16 views

Send messages from slave to master without knowing how big the data is [closed]

How would i send a message from the slave arduino to the master without knowing how big the data being sent is?
0
votes
1answer
16 views

ADXL345 I2C setup not returning anything

My hookup is like this: GND - GND VCC - 5V CS - 5V SDO - GND SDA - A4 SCL - A5 Here is the code: #include <Wire.h> #include <ADXL345.h> ADXL345 accelerometer; void setup(void) { ...
0
votes
1answer
14 views

I/O expander with i2c interface vs Multiplexer

I am wondering where are the difference in between using something like: CD4067, which selects which pins to read/write from by "selecting" an address with 4 pins by writing to it. Versus the MCP23017 ...
0
votes
1answer
60 views

Code: Switch case and loop problem

Please am working on this automatic drink dispenser, i got a sample code as am still an amature. I seem to be stuck and i please need assistance. Components: I2C, keypad, LCD peristaltic pump. ...
0
votes
1answer
30 views

I2C: What is the difference between A4&A5 and SCL&SDA pins?

On tutorials are most people using the A4&A5 pins with the Wire.h library. But i have an arduino with dedicated I²C pins. How can i use them?
0
votes
0answers
8 views

Arduino sketch for I2C communication with Pi behaves differently with different IDE versions

I am trying to establish some basic communication between the Arduino and Raspberry Pi using I2C. The Pi is the master and the Arduino is the slave. I have observed that the Arduino sketch behaves ...
0
votes
2answers
46 views

I2C multi sensors reading on Arduino

I have several sensors (Grove multichannel gas sensor, Air Pressure Sensor MPX4115A, Temperature and Humidity Sensor DHT11) where most of them uses I2C communication. I wonder if it is possible to ...
0
votes
1answer
29 views

multiple vl6180x distance sensor interactive problem

I am trying to use vl6180x distance sensor and Arduino UNO board for individual sensor doing individual distance sensing. This sensor follows the i2c protocol. Since for the same type of sensor, i2c ...
0
votes
0answers
35 views

i2c address problem when using vl6180x

I am using multiple vl6180x sensors along with Arduino UNO to detect the light and distance of each sensor. Right now, when I tried to connect three sensors applying i2c protocol(after removing four ...
3
votes
2answers
62 views

Two-wire communication (I2C) between Arduino Micros

I am attempting to communicate data via I2C between two Arduino Micros, but can't seem to get the "slave" device to detect a Wire.onRecieve() event. Per the specification on this site [http://www....
0
votes
2answers
67 views

Accessing configuration registers of OV7670 cam on i2c

I am a new user of Aurdino and want to interface OV7670 camera with aurdino uno which uses i2c mode of communication.I want to check the configuration of the device control registers and set them as ...
0
votes
0answers
40 views

Arduino to Arduino I2C audio signal

I would like to convert audio to digital and then send it over I2C to another Arduino that would convert that digital signal back to normal audio. (PWM - No amp) Would that be even possible? Would ...
0
votes
0answers
82 views

ESP8266 i2s dac

I'm building a wireless home audio system comprised of esp8266s connected to speakers, and a raspberry pi base station to broadcast the music. I'm trying to keep the project as cheap as possible, with ...
0
votes
1answer
29 views

Connector for I2C sensor

Im about to develop some home automation. It should be possible to connect new sensors to the main computer. Thats a Arduino. What can be used as a connector for the I2C sensors? It should be ...
-1
votes
1answer
54 views

How to request data via I2C?

How do you program an Arduino Uno to request data over I2C, sending parameters defining the request? I'm trying to program Arduino A to read a sensor value from another Arduino B, and it first needs ...
0
votes
1answer
30 views

DS1307 RTC not working with CC3000 WiFi shield (I2C bus hangs)

I am trying to use a DS1307 (from Sparkfun, BOB-12708) with an Arduino Leonardo. I have connected the SDA, SCL, GND, and 5V pins from the RTC to the Arduino. However, with a CC3000 WiFi shield on the ...
0
votes
1answer
67 views

Second I2C address not accepted

I have set up 2 DHT22 sensors and 2 BMP280 sensors with an Arduino Uno SMD R3 board. The DHTs are working fine and are outputting correct temperature and humidity values to the Serial monitor. The ...
3
votes
1answer
84 views

Can't retrieve data from X-NUCLEO-IKS01A1 using I2C protocol

So I bought this nucleo expansion board, the X-NUCLEO-IKS01A1, and on the package it says it is compatible with Arduino Uno. My goal here is to read data from any sensor on this board. (When I can ...
0
votes
3answers
53 views

I2C weird values when two slaves are connected parallel?

Alright I'm trying to connect two sparkfun ZX sensors that communicate to an Arduino Uno with I2C. When I connected each one independently to the Uno the Z and X values from the sensors seem fine. But ...
1
vote
0answers
47 views

Connecting arduino and EV3 using I2C

I'm trying to connect arduino uno and ev3 by using this guide (http://www.dexterindustries.com/howto/connecting-ev3-arduino/), everything works perfectly but when i tried to use analogRead block to ...
0
votes
2answers
70 views

How to make Arduino to stop updating i2c data when meet a condition and wait until it receives another serial input from processing?

I am currently making a robot with Arduino Uno, D6T omron thermal sensor (i2c sensor) and some other sensors. My thermal sensor will always update the data in array form. It will display 4 data arrays ...
1
vote
1answer
31 views

PFC8574 4x4 keypad.. correct wiring?

I bought a few PFC8574 and 4x4 keypads for a small project. I'm unclear on the correct wiring of the keypad to the PFC8574. On the Arduino Playground's site, there are pull-up resistors for each ...
1
vote
0answers
25 views

Why am I only receiving the first address byte? (I2C Protocol)

Expecting the slave to ACKnowledge and return data, but it does not. This is my protocol. This is my Datasheet. Also FYI I'm on an Arduino Fio but I am not inheriting the Arduino library. #include &...
0
votes
2answers
40 views

Resistor on SPI Chip Select Pin

I'm working on a modular CANBUS system for offroad racing. The idea right now is that the main Arduino (1284p at the moment) will be the only one connected to CANBUS, and other modules will have their ...
0
votes
2answers
29 views

I²C between 2 Arduinos sends additional receive event

I hooked up two Arduino Nanos with I²C, using 3 wires between GND <-> GND, A4 <-> A4, A5 <-> A5Ω and 1kΩ pull-up resistors on A4 & A5. When I use the following code to communicate ...
7
votes
1answer
158 views

How to design and debug a custom I2C master-slave system?

How to proceed, when in need of a custom I2C master-slave system? What are the design criteria to apply? What are the debugging tools one can use to troubleshoot problems?
3
votes
2answers
152 views

SDA/SCL pins Arduino Uno

I am trying to figure if SDA and SCL pins from Arduino Uno is a TTL or a CMOS technology. I am not able to find this info anywhere but regarding it is a I2C protocol it does make sense to be a TTL ...
0
votes
2answers
75 views

I²C only works when I short-circuit my Arduino

I'm trying to connect an Arduino Nano with a Raspberry Pi 3 via I²C. This is the small test-program I found and used for I²C. #include <Arduino.h> #include <Wire.h> void setup() { ...
1
vote
0answers
66 views

Arduino Pro Mini I2C Problem

I am trying to connect a distance sensor VL6180x to Arduino Pro Mini via I2C. Yesterday it was working without any problems, but today it refuses to work, even though I haven't changed anything. The ...
2
votes
2answers
101 views

Wire Library send/receive

I'm doing a project which includes Arduino Uno and a Custom Hardware made by me. Everything is working perfect independently and I'm trying to implement a way for them to work together (the arduino ...
0
votes
0answers
8 views

Which backpack to use with NHD-0440WH lcd?

I would like to use the NHD-0440 (Newhaven 4x40 display) with Arduino over I2C/TWI. But I cannot find any suitable/available backpack. The above display is in reality made from two 40x2 displays, and ...
1
vote
1answer
44 views

How to operate under linux an USB to I2C adapter based on the FTDI FT232R?

How can I easily use, from the command line, the USB to I2C adapter based on FTDI FT232R?
0
votes
1answer
35 views

Arduino sketch won't run until I open up GUI in processing

I am trying to make a human detection robot using D6T omron thermal sensor. However, I am facing some problem here. My Arduino Uno didn't run the sketches until I open up my GUI in processing. The tx/...
1
vote
1answer
156 views

What does it mean in I2C, “NACK received”?

I am reading about I2C. On this site: http://playground.arduino.cc/Main/WireLibraryDetailedReference#endTransmission It says that endTransmission() can return one of the following status codes: 0: ...
0
votes
0answers
207 views

Gathering data from compass module (gy-271) with Arduino

I am trying to do a project using a Arduino mega 2560 and the compass module GY-271 (hmc5883L chip) , I've already imported the libraries (Adafruit_HMC5883_U.h, wire.h ,...) and i tried to use the ...
1
vote
1answer
126 views

Problem reading an EEPROM chip using I2C protocol

I am trying to read an EEPROM chip that supports the I2C protocol (cannot tell the IC model number as it is not printed). For sure it supports the I2C protocol, since I wrote a code to detect it using ...
0
votes
0answers
68 views

DS1803 Arduino I2C Wiring

I have hooked up the arduino mega to my DS1803 and have put 4.7K resisters as pull up resisters on the SCL and SDA line. When I use a scanner program (http://playground.arduino.cc/Main/I2cScanner) the ...
1
vote
0answers
146 views

How to read data from arduino with raspberry pi via I2C

I have connected Raspberry pi 2 model B with arduino uno via Bi-Directional Level shifter, from this BLOG Raspberry pi GND ---------- GND Arduino 3.3v ---------- 5v ...
1
vote
2answers
68 views

How to write a sketch when adding more devices to a I2C data line

I am building a weather station that utilizes a battery operated outside unit that transmits data from a DHT22 sensor to a unit inside my house . The inside unit is using I2C communications from my ...
0
votes
3answers
73 views

Can someone explain how to program i2C communications without using the library?

I am starting to get into i2C, SPI, and other forms of communication. I have read about them and have a fuzzy idea of how they work electrically, but can someone explain how I would turn the ...
1
vote
1answer
30 views

Loop behaves oddly in I2C receiveEvent

I am messing around with an ATmega328P hooked on a Raspberry Pi, communicating over I2C: the ATmega is the slave (details at the end). While testing the basics of the concept, I faced an interesting ...
1
vote
1answer
82 views

Serial Not Working With I2C

I have been working on a hydroponic garden that is controlled with Arduinos. I have everything working except for the user interface. What I would like to do is have an LCD screen paired with a rotary ...
0
votes
1answer
57 views

Regarding using I2C with Arduino for Silicon Micro-structure 5852 D 1.5 psi

I am trying to get output from a sensor (micro-structure 5852D), but I only get two outputs: 11 and 255 for even applying pressure. The following is my code, please show me how to over come this ...
2
votes
1answer
70 views

Send AND Receive through i2c / set Arduino as master AND slave

For a project I'm using 2 Arduino Uno's, where Arduino#1 (master) sends raw data to Arduino#2 (slave). The slave should receive and encrypt the data and afterwards send the encrypted data back to the ...