Tagged Questions
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.
1
vote
2answers
25 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....
3
votes
2answers
93 views
+100
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
16 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
21 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
93 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
18 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
31 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 ...
1
vote
2answers
62 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
17 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
84 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
70 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
46 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
44 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
28 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
28 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
16 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 ...
3
votes
0answers
56 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
42 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
25 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
24 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
37 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
38 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
52 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
31 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
42 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
90 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
39 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
14 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
120 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
116 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
63 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
98 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
187 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
73 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
216 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
32 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
65 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
51 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
118 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
192 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
90 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
81 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
78 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
52 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
27 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
59 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
31 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
249 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
232 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 ...