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
1answer
10 views

Bizarre compilation problem — only compiles with the addition of a single Serial.println() line?

I have a SwitchDoc Labs DS3231 Real Time Clock Module that I am using with an Arduino Mega. It's connected to 3.3V and the SDA(20)/SDL(21) pins. I'm also using SwitchDoc's RTC_SDL_DS3231_ARDUINO ...
2
votes
1answer
66 views

I²C between ATTiny85 (8MHz) and Arduino Uno

I keep receiving the following error in myATTiny85-Slave code below: sketch_mar12a.ino: In function 'void setup()': sketch_mar12a:19: error: 'class USI_TWI_S' has no member named 'onRequest' ...
1
vote
1answer
23 views

How to change i2c address for mpu9250?

I'd like to connect 12 mpu9250 sensors to one arduino board. I can't find documentation on how to change the addresses of mpu9250 boards. (i read through the reference ). Some tutorials talk about ...
1
vote
1answer
34 views

How does the Arduino send more than 6 bytes via I2C

I have been working with the wire library (I2C) to send data from one Arduino to another. I read that the Arduino can only send 6 bytes per cycle, but I have been able to transfer much larger ...
1
vote
1answer
24 views

How do I send a string to master using i2c

I want to write an Arduino program that simply recieves a string (via the I2C wire library) from a master Arduino, then waits for a request, and sends that string back. Here is my code: #include ...
1
vote
0answers
17 views

Interfacing accelerometer LSM303DLH with Arduino UNO using I2C

I am trying to connet a tri axis accelerometer LSM303DLH to arduino UNO using the libraries taken from the following links (https://github.com/adafruit/Adafruit_LSM303DLHC and/or ...
0
votes
0answers
52 views

I2C hookup - sketch just crashes

I am encountering problems with I2C when trying to attach a 9DoF Sensor to my Arduino Uno. Following these instructions (the hardware setup I have is like in the schematic) I noticed the basic example ...
2
votes
1answer
70 views

Interfacing Arduino Leonardo with PCA8574AN

I'm trying to interface my Leonardo with a "Mindsensors Magic Wand" - 8 LEDs connected to a PCA8574AN chip. On the manufacturer's page, they say it's compatible with Arduino, however no instructions ...
2
votes
0answers
63 views

Unstable system when controlling power to serial peripheral devices and sleeping

In the process of trying to make a small system that will last a while on 4 AA batteries, I've reduced my Arduino project to a barebones system that when asleep draws a tiny amount of current from the ...
0
votes
2answers
53 views

How do I connect two slaves of same type in I2C?

I am not experienced about I2C communications, but I do happen to have two HMC5883L magnetometer modules that I wish to connect to a single arduino. It uses I2C protocol, and hence the slave device ...
1
vote
1answer
104 views

Arduino and Raspberry Pi - 5V/3.3V I2C

This topic have been covered in various places, but I still think it hasn't been thoroughly explained anywhere. Doing google search on connecting Arduino to Raspberry Pi via i2c gives for example, ...
0
votes
0answers
54 views

i2c of Atmega 328 on arduino uno not working

I am using Arduino uno board with Atmega 328 for i2c. The ic is not showing any clock signal on its SCL line on oscilloscope, The same code when used with different new atmega 328, and same code. It ...
0
votes
1answer
54 views

About arduino serial communication

I've used the arduino uno with the python serial library months ago and some packets got lost in the way. I've been searching about serial communication for arduino and I've been thinking that I could ...
1
vote
4answers
532 views

I2C LCD Serial Interface Board not displaying text (wrong pins?)

I have a 1602 LCD screen that works fine on its own. However I wanted to free some pins by using an I2C / IIC LCD controller I purchased separately. While the controller seems to be communicating ...
3
votes
1answer
94 views

RTC MCP7940M not counting up

I'm able to set a time and to read it back without any problems but it doesn’t tick up. It stays the same. Even if I restart the serial monitor and thereby resets the buffer(?). So it seems to me that ...
1
vote
1answer
69 views

Delay() function and I2C interrupt

In my design, one arduino pulls a line high on other arduino, the other arduino polls this pin and if that is high sends the data on I2C bus. The first arduino holds the line high for 100ms using the ...
0
votes
0answers
103 views

Wire.endTransmission() Hangs

I have written a code that transmits data over the I2C channel, The device ID and every other stuff is working fine. The only issue being that my code gets stuck at Wire.endTrasnmission(). I found ...
0
votes
1answer
33 views

Global Arrays read as Zero

I have written a code for my Arduino which spans multiple files, In the file containing the main task, i have a Global Array like this addr_t childAddr[NUM_CHILDS] = { CHILD1_I2C_ADDR, ...
1
vote
1answer
45 views

Arduino UNO R3 possibility

Can I use an ultrasonic sensor, ir sensor, serial communication with MATLAB on computer and i2c communication with a D6T MEMS thermal sensor simultaneously in Arduino UNO ?
4
votes
2answers
121 views

Is there a pullup on I2C?

I am using an Arduino Uno R3. It is not clear on the schematic whether there are pullups on the A4 and A5 I2C pins. Are there hardwired pullups or do I have to add them myself?
3
votes
2answers
86 views

Ideas for setting I2C device IDs

I am using I2C to communicate between a collection of ATtiny85s that are acting as controllers for various parts of a system and the "Main Brain" -- a RaspberryPi. Most of the ATtiny85s only have a ...
1
vote
1answer
82 views

Can the Arduino use this i2c LCD Panel

Can the Arduino Mega2560 use the New Haven NHD-0420D3Z-NSW-BBW-V3 LCD panel by controlling it with the New LiquidCrystal library? What cable will you use to connect the LCD to Arduino, are there screw ...
2
votes
2answers
735 views

Sainsmart LCD 2004 - LiquidCrytal_I2C library issue unable to compile

I bought a Sainsmart LCD2004 from Amazon to use with my Arduino Uno. I understand that since this LCD uses I2C a new library needs to be downloaded. From the sainsmart website I dowloaded the LCD ...
0
votes
1answer
90 views

Connect multiple I2C to an Uno

Is it possible to use more than 1 device that needs to use SDA for I2C with a mini? Would you use a different analogue pin with a 10k pull up resistor and tie all of the devices to the SCL?
2
votes
2answers
2k views

How do functions outside of void loop work?

I am used to arduino sketches with a void setup() part that runs once, and a void loop() part that keeps looping. What happens when you have void functions outside of the main void loop()? Will these ...
0
votes
0answers
72 views

pcf 8591 arduino and labview

Is it possible to connect p0cf 8591 adc / Dac kit to arduino through labview interface for arduino. i want to take data from analog sensor to pcf 8591 to arduino to labview for processing. Arduino is ...
1
vote
3answers
91 views

How to wait for next n bytes in I2C exchange?

I'm trying to get data from a sensor, but don't see how I can get data back. I'm looking at the data on the I2C bus with a logic analyzer, and I'm sending what I expect, but I seem to cut off the ...
0
votes
1answer
248 views

need help hooking up an oled display

recently i bought this oled display . http://www.wvshare.com/product/0.96inch-OLED-A.htm how can i connect it with arduino . Driver Chip is SSD1306 . Supported Interface are 3-wire SPI, 4-wire ...
1
vote
2answers
775 views

Arduino Yun - not enough i2c & interrupt pins?

I'm trying to build a small personal weather station. The rain sensor, and wind speed sensor use interrupts. The barometric sensor uses i2c SDA and SCL. Reading the Arduino Yun manual, it says there ...
1
vote
1answer
494 views

Problem connecting Arduino Uno with Wifi and NFC

I'm new here and also new to Arduino. I've got a rather specific problem and I've posted to the official Forum on arduino.cc two days ago (original Post) Sadly, I've yet to recieve any help and ...
4
votes
1answer
173 views

Burning sketch with I2C

Not a pure Arduino question really. I'm actually using a standalone ATmega168. So far I've been using AVR-ISP programmer (working from AVR Studio) to program the chip. After everything is done, the ...
6
votes
2answers
216 views

Cheap Wired Multipoint Mesh Network

I'm looking to make a 15 x 15 grid of load sensors and RGB LEDs for an interactive dance floor. Each node will be driven by an arduino and the entire floor will be managed by a RaspberryPi. I'm trying ...
3
votes
1answer
147 views

I2C RTC returning bad times - sometimes

I have a TinyRTC I2C clock in one of my Arduino projects, and it works most of the time. But occasionally, it will report the time as 165 hours, 85 minutes and 25 seconds (165:85:25) for a couple of ...
0
votes
0answers
52 views

Errors With Hitechnic Infrared Seeker Library and Arduino Robot

I'm trying to this library with an Arduino Robot, but am experiencing problems. The setup, loop and DirectionAngle methods in the example code are compiling and working well apart form this line: ...
1
vote
1answer
223 views

I2C seems to stop working when I attach an AF motor shield

I have a cheap MPU 6050 chip that communicates over 3.3V I2C. I can talk to it just fine on my Leonardo. If I add an additional Adafruit Motor shield (the old one), my MPU 6050 demo sketch hangs ...
1
vote
2answers
156 views

Using an Adafruit Trellis to control a set of relays

I've been going through my program again and again, and I can't figure out what is causing it not to work as intended. First, the story: I'm trying to use an Arduino to control a bunch of relays ...
2
votes
1answer
350 views

Cannot read from 2 I2C slaves consecutively

I am currently trying to communicate between 3 Arduinos using I2C. One of them acts as a master, while the rest act as slaves. I can request data correctly from the master. But if I were to do 2 ...
0
votes
0answers
240 views

How do I go about passing an array of data (integers) from an Arduino to Raspberry Pi over I2C?

I have been struggling to pass an array of data (integers) from an Ardunio to Raspberry Pi over I2C using the Wire (Arduino) and SMbus (RasPi) libraries. I've tried using read_byte_data but it seems ...
1
vote
1answer
92 views

9 DoF Sensor Accelerometer Readings Inconsistent

I have the following sensor stick: https://www.sparkfun.com/products/10724 It has an accelerometer, gyroscope, and magnetometer. I have connected it to an arduino and am reading the accelerometer ...
1
vote
1answer
146 views

Is i2C more or less robust than GPIO?

Currently using i2C to connect a RPi with an arduino. It seems i2C is quite finicky and, drops the bus immediately if there are any IO errors. Since what i am building is meant to be semi permanent, I ...
0
votes
1answer
84 views

Proxying streaming i2c data(int values) to serial

The following code works correctly in reading single int values. It also works correctly for 3-4 seconds if I 'stream' the values in constantly (Mouse move coordinates) before I get an IO error and ...
0
votes
3answers
999 views

Receiving 2byte int values over serial

I am using Python smbus write_word_data method to send int values from a Raspberry Pi to an arduino. This seems to be the correct method. When I send values from 0-255, I see the following in my ...
1
vote
0answers
66 views

i2C and lost connections with IO errors

Having issues troubleshooting IO errors using i2C . Running a Python script on a raspberry Pi as master talking to an Arduino slave. The problem is that when making any change in my code that results ...
1
vote
0answers
138 views

Lockup while evaluating Wire.requestFrom function (Arduino)

I am currently working on a Arduino project that combines an InertiaOne IMU sensor board (from Atmel), with an Arduino UNO and two motors driven by a Makeblock driver board. All sensors communicate ...
1
vote
0answers
71 views

GPS - Speed doesn't update as should - EM408 & Arduino Mega & GSM

I'm developing a system that will get the GPS signal and send it though the GSM with information about position, speed and temperature from some digital sensors. Currently I'm using the GPS EM408, ...
2
votes
0answers
494 views

MCP7940 RTC Library

I am looking to implement a Microchip MCP7940 real time clock into my sensor data logging circuit that I have based on the Uno. Would the most logical solution be to attempt at changing an existing ...
-1
votes
1answer
388 views

I cannot find the I2C device by scanning

I've been trying to get a LCD I bought from deal extreme to work for some time with my ATTiny85 chip. It should be capable. I've tried googling the device but there is no proper documentation, so I ...
2
votes
1answer
3k views

I2C 2 way communication between Arduino Uno and Arduino Mega

if I remove the transmission code from slave this works properly but I need to transmit from slave. Here is my master code #include <Wire.h> void setup() { Wire.begin(3); ...
4
votes
1answer
2k views

I²C with ATTiny85 at 8MHz using TinyWireM library

Hello fellow Arduino enthusiasts, I am trying to make the ATTiny85 talk I²C with a MMA7660 breakout board I have (it's an accelerometer, this is a follow up question to my previous one). I would ...
1
vote
2answers
76 views

Connect two Arduinos using I²C (wiring)

Altough having found a lot of documentation concerning wiring of I²C buses, I'm still not sure about the following question: If both devices use separate power sources, is it a good idea to connect ...