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.
0
votes
1answer
15 views
How to use potentiometer data from slave to master Arduino?
I'm trying to make a game where i can use one Arduino as a controller (the controller is a potentiometer) and the other Arduino sending the signals to the computer. Im trying to figure out ...
1
vote
1answer
26 views
Need to turn on project twice in order for screen to work!
This problem is really stumping me. I made a simple printed circuit board with an ATtiny85, a 128x64 I2C OLED display, and a Sharp IR analog distance sensor. You can view the circuit here: circuits.io....
4
votes
3answers
41 views
How to setup an I2C bus which stays valid if a slave is powered down or fails?
I have setup an I2C bus between 3 Arduinos (Master, Slave1 and Slave2) by connecting all 3 A4 pins together, all 3 A5 pins together and one GND pin of each Arduino to a common ground line. The 3 ...
0
votes
1answer
42 views
Does recieving data with SPI stop the main loop
I have a loop of code running on a Mega 2560 that is running at a certain speed that I get from an Arduino Uno. I have tried to talk with I2C but when I have received the data from I2C, the whole code ...
1
vote
0answers
20 views
wire.h onReceive only triggering once
I am writing a program to emulate a LCD driver chip (PCF8576) in a piece of equipment where I need to replace an unobtainable LCD display.
I have wire.h set up and the code in place to decode chip ...
4
votes
2answers
385 views
Which library to choose? <Wire.h> or “Wire.h”?
I know that in C++, to include a library, you either put the library name in <x> or "x". Now, I believe that this was because of a major change in the C++ language a some time ago.
Now, in ...
0
votes
1answer
28 views
Arduino and Raspberry Pi - initiate i2c communication as slave
I would like to interconnect Raspberry Pi and Arduino over i2c.
RPi will act as MASTER while Arduino is SLAVE.
I understand that i2c is designed that only master can send messages to slaves and then ...
-3
votes
1answer
19 views
Control multiple MPU9250 to start collecting data at the same time [closed]
Is it possible to use multiple MPU9250s for data acquisition at the same time?
I want to use 10 MPU9250s in human motion capture, but how make all MPU9250 work at the same time so that make the data ...
4
votes
2answers
63 views
Does an I²C IO Expander needs additional resistors for outputs?
I have following setup (see also schematic in the end)
Arduino Nano is connected via I²C to the PCF8575C (link) IO Expander.
Both, SCL and SDA have 10kOhm pull-ups to 5V.
The Expander pins are ...
0
votes
1answer
30 views
Arduino bug when “myFile = SD.open” is inside loop()
My Arduino resets / bugs each time I put myFile = SD.open in loop().
In setup() it works fine.
I have a 20*4 LCD and a RTC in I2C, a SD card reader in SPI, and a fingerprint sensor.
Here is my code:...
1
vote
2answers
26 views
Update Variable via Arduino to Arduino I2C
I am attempting to send a simple 1 byte value from one arduino to another using I2C with the Wire library. From reading I see that this is typically done using the event monitor supplied by the Wire ...
0
votes
1answer
35 views
SPI Overflow in 328 slave with i2c sensor
I am working on creating sensor poller that is going to be polling multiple sensors and then, on request, provides its data to the master.
The master polls the slave (SPI) at 50hz and the slave is ...
3
votes
0answers
45 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
32 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
2answers
48 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
25 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
24 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
81 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
43 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
78 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
109 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
79 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
163 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
62 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
122 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
31 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
62 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
106 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
26 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
166 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
106 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
91 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
68 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
39 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
45 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
20 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
78 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
73 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
34 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
28 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
44 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
43 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
75 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
48 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
73 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
111 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
45 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
23 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 ...