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

3
votes
0answers
30 views

I2C to UART bridge as breakout or in DIP package

For a project, I need to connect more than one device to an Arduino through a serial port with hardware flow control (RTS/CTS). Sparkfun used to make breakout boards for the SC16IS750, but this ...
3
votes
1answer
25 views

I2C collision detection

I have put together a system that uses multiple Arduinos and a couple of 20x4 LCD displays to monitor my PV sun tracker and a weather station. I am using I2C to link them all together. One of the ...
1
vote
1answer
36 views

Problems reading I2C sensor when using a Xbee module

I'm developing a project where I can control a RC boat with GPS and a magnetometer. How ever, I was developing everything connected to my computer and worked pretty well. When I was going to make some ...
0
votes
2answers
24 views

Common/standard library and/or protocol for Arduino to be I2C slave for driving NeoPixel

I would like to control a string of WS2812/NeoPixels from a SBC like a BeagleBone or C.H.I.P. I realize someone has gone through the trouble to come up with a way to drive the WS2812 string from a ...
1
vote
1answer
18 views

Help with 1-Wire to I2C translate

Please, someone. I want to use a temperature sensor (DS18B20) in an I2C only shield (Tentacle Mini), but this sensor is One Wire only. Can I write an I2C code to change the 1-Wire to I2C for this ...
3
votes
1answer
64 views

I2C connection freezes Master if Slave disconnects

I am using I2C to successfully request critical data from a Slave device (I have to use requestFrom() in the Master) but if, for some reason, the power disconnects from the Slave device then the ...
0
votes
2answers
38 views

I2C on non I2C pins, possible?

I have 2 I2C devices that uses the same address. One of them is the DS3231 RTC. I use this library for the DS3231. I dont want to mess with the other one cause it is way more complicated then this one....
0
votes
2answers
65 views

Multiple I2C BREAKOUTS with pull-up resistors doesn't work [UPDATE]

[UPDATE] Now it works fine but the as soon as I add the GY-521 module (hardware not software), it starts sending me crapy info Project uses: Arduino Pro Mini as brain FTDI as a programmer GY-521 ...
3
votes
2answers
89 views

Soldering Arduino Pro Mini's disaligned pins

I have a couples of Arduino Pro Minis (original from sparkfun) that have those 4 disaligned pin. Unfortunetely, I need to use 2 of them, A4 and A5, because they are the I2C pins and I want to solder ...
1
vote
2answers
53 views

Difference between Wire.setClock() method and TWBR method for changing I2C Frequency

I want to change the I2C frequency of my Arduino Mega 2560. I did find two methods. One method is to change the TWBR variable after Wire.begin(). The other one is to use Wire.setClock() after Wire....
4
votes
2answers
144 views

ATTiny85 I2C LCD

My setup is as follows: Arduino IDE 1.6.11 Arduino Pro Mini as ISP ATTiny85 1602A LCD with I2C board The libraries I use are: TinyWireM (source: https://github.com/adafruit/TinyWireM) ...
1
vote
0answers
17 views

I2C Raspberry Pi and Atmega328 [closed]

It is for a while in which I am trying to understand why a communication between the master Raspberry Pi and a board with an Atmega328P slave based on the I2C bus does not work always in read slave ...
1
vote
0answers
49 views

How to prevent Wire.requestFrom from hanging?

I'm trying to read data from an Arduino Uno I2C slave via Wire.requestFrom() on an Arduino Uno master. The slave's onRequest handler is simply: void I2C_Send() { byte myArray[4]; myArray[0] = ...
4
votes
2answers
111 views

Sending uint16_t over I2C

How do you transmit and read a uint16_t over I2C? I'm trying to read two uint16_t values from a slave device, and I'm seeing nonsensical readings. This is the code on my slave Arduino Uno: #include ...
0
votes
1answer
25 views

How to make PCA9685 work with Arduino Due?

I have Arduino Due and PCA9685. I use this library: https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library The board does not do anything with servo connected. I tried to use SDA/SCL pins and ...
0
votes
1answer
46 views

How to turn I2C Sensors on and off with an Arduino Mega 2560?

I want to turn on and off I2C Sensors with the Arduino Mega 2560. I use one max. 0.4A NPN Transistor, which controls the Vcc line to the sensor. When I plug my Arduino into my laptop and the sketch ...
1
vote
2answers
87 views

Controlling a capacitive touch screen that doesn't have I2C/SPI

I have been searching for cheap slim 3" 16:9 capacitive touch screens for a while now. But I couldn't find any that had an I2C or SPI interface. The cheap displays always have these ribbon cables with ...
0
votes
1answer
22 views

How can I determine how many bytes an I2C master read from my Arduino acting as I2C slave?

I have an Atmega328 programmed using the Arduino software and libraries (but is standalone on on a board in the TSOP package) without bootloader and with ISP programming). I am using the Wire library ...
0
votes
0answers
134 views

Grove- Multichannel Gas Sensor - Arduino

I am connecting the Grove Multichannel Gas sensor with Arduino Uno like any other I2C sensor (Vcc, GND, SLA, SDA) and I am using the basic example of the library to read the gases concentration. ...
4
votes
2answers
89 views

Arduino I2C long string

I am trying to get 2-Arduinos passing data. The Master will request the data and the Slave send it. But, the length of the string the Slave will send is unknown each cycle. I found some things here ...
0
votes
2answers
78 views

Arduino Wire.h library how to communicate with an LCD

I am having an Arduino Uno and an C2042A LCD with I2C shield on it. Because the virtualwire library does not work for me I tried only the wire library but it's still not working: My Code: #include &...
0
votes
0answers
57 views

How Send Multiple Data To Raspberry via I2C Using Windows 10 IOT

First, Sorry for my bad english. I'm trying to get multiple sensor (DHT11) values from arduion via I2C. But i cant do it. There is a simple how to send data to raspberry from arduino, but it's just ...
0
votes
1answer
35 views

Arduino which library for led 4x20

I am having an Arduino Uno and I want to add a LCD to it. My LCD is a C2042A with I2C shield on it. I tried the LiquidCrystal_I2C library but it doesnt work. I am not getting any errors the LCD is ...
1
vote
2answers
36 views

Delaying pushbutton input to microcontroller while it's busy processing I/O

I am trying to create my own home automation using Arduino. I am using shift register for reading input(via push buttons) and writing output to led's. I am using SPI interface to communicate with ...
0
votes
0answers
19 views

Inexpensive way of connecting a lot of modules on a distance

I need to connect a lot (~100) of modules with a computer (Raspberry pi). The modules are based on Arduino micro and are very simple. They will be spread around, but for the two adjacent the distance ...
0
votes
0answers
17 views

Newbie question with HC-SR04 and OLED

Nothing more humbling than taking up a new hobby (in this case fiddling with Arduino). I have a ultrasonic range detector, and a little OLED display. Simple start...measure and display distance. I ...
4
votes
0answers
69 views

Arduino as a custom I2C slave device

I'm trying to interface with a master I2C device that doesn't exactly follow the normal I2C protocol. The only difference really is in the read request. A "normal" I2C read operation looks like this (...
0
votes
2answers
54 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
33 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
27 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
41 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
40 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
69 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
43 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
59 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
103 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
42 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
17 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
140 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
167 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
72 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
125 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
228 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
93 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 it ...
0
votes
0answers
289 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
34 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
79 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
56 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
149 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
235 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 ...