We changed our privacy policy. Read more.

Questions tagged [i2c]

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.

Filter by
Sorted by
Tagged with
2
votes
4answers
184 views

Can an Arduino Micro receive commands from another microcontroller when hardwired together?

I plan to build functioning reaction wheels, controlled by an Arduino Micro. Ideally, I'd like to have the reaction wheels, and the micro, be a single unit which would receive external commands from ...
5
votes
2answers
1k 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
1k 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 ...
6
votes
1answer
9k 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
2answers
103 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, ...
2
votes
1answer
119 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 ?
7
votes
2answers
1k 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?
5
votes
2answers
308 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
683 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 ...
7
votes
3answers
10k 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
755 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?
9
votes
4answers
46k 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 ...
1
vote
3answers
2k 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 ...
2
votes
1answer
392 views

What is the execution context of the function registered via the Wire.onReceive() method?

I'm basically wondering if it's OK to Serial.write() or print in the function I register to be called when I2C data is received. I can't seem to find the execution context or any warnings. http://...
0
votes
1answer
2k 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 SPI, ...
1
vote
2answers
4k 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
2k 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 ...
8
votes
2answers
2k 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 ...
11
votes
2answers
1k 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 ...
5
votes
1answer
977 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 ...
2
votes
1answer
1k 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
517 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 ...
3
votes
1answer
1k 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 ...
2
votes
1answer
243 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
300 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
483 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 ...
2
votes
3answers
7k views

Receiving two-byte int values over serial

I am using Python smbus write_word_data method to send int values from a Raspberry Pi to an Arduino using I²C. This seems to be the correct method. When I send values from 0-255, I see the following ...
2
votes
1answer
840 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 ...
2
votes
0answers
221 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, ...
3
votes
1answer
3k 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 ...
2
votes
1answer
4k 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 ...
7
votes
3answers
30k 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); Wire.onReceive(...
5
votes
2answers
14k 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 ...
2
votes
2answers
492 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 ...
0
votes
1answer
1k views

Best way to interact arduino and python

So, i've worked with the pySerial module for python, where I communicated with my arduino via serial. However, this module only works for 32bits and I would like to make my project work on both ...
3
votes
3answers
3k views

Interfacing Arduino through USB or I2C?

I am planning to connect multiple Arduinos to my Raspberry Pi. There are basically two ways I can achieve that: Use an USB hub. Each Arduino will then be available through ordinary serial commands ...
2
votes
1answer
738 views

Reading CMPS10 raw values

I've got a cmps10 compass module hooked up to my arduino due through a logic level converter. I am writing code to convert the raw magnetometer readings into a bearing that I can use but have run into ...
3
votes
2answers
538 views

Arduino Master-Slave Pins

Can I change the pins on the communication for a Master-Slave arduino Wire transmission? I want to communicate between 2 arduinos, but on one of them A4&A5 are taken
2
votes
2answers
2k views

Arduino to Raspberry Pi wired communication

I am new to Raspberry Pi (just brought mine before writing this post), and I am looking to see what is the most ideal way for two way communication between an Arduino and a Raspberry Pi (USB, SPI or ...
3
votes
1answer
275 views

Adding devices makes I2C read 0

I'm using an Arduino Due with a logic level converter to interface with two different 5v sensors via I2C. Being of poor quality, these sensors have no data sheet. When either one of these sensors is ...
1
vote
1answer
370 views

Connect Arduino with fischertechnik TX Controller

Is it possible to cinnect the Arduino with a fischertechnik TX Controller? Maybe with I²C, but i want to use I²C for something else on the arduino. So are there multiple I²C Ports on the Arduino (I ...
3
votes
3answers
2k views

LCDs larger than 20x04 and 5" diagonal

Are there any i2c LCD screens that are larger than 2004 characters and larger than 4.8 x 2.7 x 1.2 inches in dimensions? I have the Sainsmart 2004 LCD but it can't display all the information that I ...
1
vote
2answers
2k views

Are there any good and maintained libraries for using DS2482 I2C to 1-Wire bridge?

The DS2482-100 and DS2482-800 are I2C to 1-Wire bridges which are useful for driving complex 1-Wire networks. These are natively supported by a number of packages in Linux so you can interface easily ...
12
votes
3answers
29k views

How do I use I2C devices with Arduino?

I have a few useful I2C components, such as a 16-bit port expander (MCP23017), which I'd like to use in various projects. What do I need to do to make these work with Arduino? Will it work with any ...

1
10 11 12 13
14