Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

-1
votes
0answers
23 views

i2c callbacks occur in wrong order

I'm trying to implement a an SMBus slave and discovered that when the master sends a SMBus ReadByte command, the onRequest and onReceive occur in the wrong order on both a Uno and a Zero board. Some ...
0
votes
0answers
39 views

Calculate pullup resistor, cat5e ftp

let me describe my schema, i got one arduino and one esp32 connected over i2c using 30m cat 5e ftp cable, I'm using 12v to power up both devices, each of them have dc-dc converter that convert to 5V, ...
0
votes
0answers
17 views

Does LabVIEW Linx affect the communication speed with Arduino?

I am using LabVIEW to connect to Arduino Mega. I control a logic gate to switch the current On/Off and at the same time there is an I2C connection with a sensor. It came to my attention that the ...
0
votes
1answer
20 views

Increasing speed of Vl6180x Sensors

I have 5x vl6180x pololu ToF sensors. I have managed to hook up all of the sensors to the arduino via I2C by making each sensor startup at different times and when they do, changing their addresses, ...
1
vote
0answers
23 views

Can't get MMC3416xPJ to work

I needed a magnetometer with a high Output Data Rate (ODR). This is because I wanted to measure AC magnetic fields of around 20-80 Hz. So I decided to go with the MMC3416xPJ prototyping board which ...
0
votes
0answers
25 views

Arduino 3.5" TFT Display going blank after sending data through I2C

I'm trying to use I2C to send and receive commands between an Arduino UNO R3 and an Arduino Mega R3, with a 3.5" TFT display connected to the Mega. I have verified that my display is fully functional ...
0
votes
1answer
19 views

Trouble with i2c on ESP8266

I have used with partial success I2C with the ESP8266. When it works, it works well, with many devices on the bus. I've examined the signals on a 'scope to assure Vlo, Vhi, Tr, and Tf. However, ...
0
votes
0answers
33 views

I2C between two arduinos

I have 4 gyro sensors that communicate to arduino uno using I2C and then arduino uno sends the data to arduino mega. I was wondering if I could use i2c for this purpose or if I should look for other ...
1
vote
2answers
48 views

Problem with reading data from HMC5883L in GY-86

I am trying to read the data from GY-86 with my arduino UNO. While reading MPU6050 and MS5611, it works quite well. But somehow I can't read anything from HMC5883L. Here is the code I used: #include &...
-2
votes
1answer
54 views

How to use I2C library

My A4 and A5 pins are already hooked up to a LCD and I want to connect a MPU6050 as well. In a separate thread, someone told me to use SoftI2CMaster library to use other pins as SDA ans SCL. But I don'...
0
votes
2answers
42 views

Using MPU-6050 without I2C

My target is to use multiple MPU-6050 at once, I searched on the internet and found that they can be hooked up really simply. Just connect in parallel and use I2C-Scanner. Then get those addresses and ...
0
votes
2answers
39 views

Sharing serial output from one to many arduinos (plus a computer) via USB hub

I am trying to send rotary encoder output from an UNO to seven Trinket M0s and a computer via a (powered) USB hub. Currently the UNO → Laptop bit works great, serial monitoring works via the hub ...
1
vote
2answers
41 views

Two sensors using I2C

We have two sensor one of them(MPU6050-gyro) is communicating using I2C, the other is via SPI(SD card reader). Now, we need an additional component as a sensor that the barometer which communicates ...
0
votes
0answers
10 views

Detect an unknown communication protocol and read data on it [migrated]

We have old type textile machinery in our factory. (open end machine) on the machine's screen is showing the operating efficiency of the machine. Under the hood, When I follow the cables, the sensors ...
2
votes
3answers
109 views

I2C interference SENSOR(SCL+SDA) and MasterSlave comm

I am building a weather station with an Arduino slave (dedicated to a rain gauge - depicted below as a reed switch) and a NodeMCU master with some additional sensors. One such sensor, a BMP280 uses ...
0
votes
0answers
29 views

i2C master/slave Arduino uno Programming to run 2 motors at once off separate boards [duplicate]

I am attempting to run a master/slave receiver arduino using two arduino uno's. I'm synchronizing both Arduino to control 1 dc motor and 1 stepper motor at once which each of the Arduino UNO board ...
1
vote
1answer
100 views

ESP8266 I2C datasheet pins not the same as several examples

According to espressif datasheet of the ESP8266 it uses MTMS (I2C_SCL) and GPIO2(I2C_SDA) for I2C. However in several examples I've seen the typically use is GPIO(4&5) or GPIO(0&4) to ...
1
vote
1answer
55 views

Working with Wire core library

I'm studying the Wire library code driver utility/twi.h to learn how twi buffering and ISR management work. What I did actually, is that I copied the header/source files from the Arduino path F:\...
3
votes
4answers
304 views

Is there any limitation with Arduino Nano serial communication distance?

I am trying to build Project which communicate multiple Arduino Nanos. I wanted to understand if Arudino Nano is capable of doing that, while doing research I came across post where it says ...
0
votes
1answer
68 views

Multiple slave(sender) to one master (receiver)

I beg your help to my project I wish to send the data from slave to master but only one data is receive out of two slaves. //master #include <Wire.h> void setup() { Wire.begin(); // ...
0
votes
1answer
24 views

compare char receive from Slave writer to Master reader with I2C

Im trying to send data from slave (writer) to master (reader) then compare it to declared 'char p[]' to turn on the lights but somehow i cant make it work. ////master reader #include <Wire.h&...
0
votes
2answers
58 views

How to get average of 16bit ADC readings?

I have an Adafruit ADS1115 analog-to-digital converter, configured in single ended mode. I want to average over 3 sensor readings to increase the reading stability. //initialize variables int16_t ...
0
votes
4answers
54 views

How can I hook up multiple MMA8451 accelerometers, (I2C protocol) using one Arduino Mega?

How can I hook up four (adafruit) MMA8451 accelerometers (using I2C protocol) using one Arduino Mega? What I'm confused about is I only have one SDA and SCL on the Arduino Mega obviously. So how can I ...
0
votes
1answer
53 views

Is it possible to send a float Array over I2c

I have tried it several times myself but i never could send or receive it properly. I am asking myself if it is possible and if so could someone explain how? Cheers.
0
votes
0answers
43 views

Lost with Nano and i2c

I've been struggling with some code that was failing to "begin()" any devices on my i2c bus. I've uploaded a scanner program from arduino playground which lists the addresses of any i2c modules found. ...
1
vote
1answer
49 views

conflict with different i2c devices

I am trying to communicate with two i2c components using an arduino nano - some ADS1115s and some i2c flow sensors each connected to a different i2c multiplexer, but they seem to be conflicting. ...
0
votes
0answers
54 views

i2c code hanging - tried all connections

I'm trying to connect a TCA9548a breakout to my nano (also tried using an uno), but it can't recognise it - using the i2c scanner it just hangs on 'scanning...' I've tried everything suggested in ...
0
votes
0answers
34 views

Arduino IDE + Metro + I2C device (Grideye) + Code for Uno = weird results?

I have been working successfully with the arduino uno and a thermal camera device called grid eye. There is a board available at the popular suppliers of arduino addons. For the uno, the code looks ...
0
votes
2answers
80 views

MPU-6050 with Arduino - postmortem

I'm working with MPU-6050 with Arduino Uno. I copied the code below from Arduino Playground - MPU6050. Code : // MPU-6050 Short Example Sketch // By Arduino User JohnChi // August 17, 2014 ...
0
votes
1answer
32 views

Arduino help adding a second mpu 6050 sensor my working code

Background information: I currently have this arduino code that uses one mpu 6050 sensor to get angles in the x, y, and z directions and then display them to the user nicely. Code can be found here ...
0
votes
2answers
49 views

HD44780 display incorrectly black-on-blue instead of white-on-blue

I have a generic HD44780 compatible 16x2 LCD display, with an already soldered on PCF8574 module. Its backlight is blue, and the characters are supposed to be white (on blue). It is connected to a ...
0
votes
0answers
32 views

Having trouble reading directly from VEML6075 UV sensor from its registers(I2C)

I'm kinda new to Arduino and decided to dive deeper into learning abit more about Arduino; So i decided to grab a Sparkfun VEML6075 UV sensor and try to: 1) Initialise it 2) Take readings from it ...
0
votes
0answers
38 views

LCD not displaying any character with I2C or when used separately

I have an arduino uno and pin connection for I2C are - SDA --> A4 SCL --> A5 VCC --> 5v GND --> GND This the code i am uploading taken from the examples - #include <Wire.h> #...
1
vote
1answer
41 views

Wire.h missing - Failing to upload I2C 16x2 LCD sketch

I am total newbie in Arduino and for the last 3 days I am trying to figure this out. I would like to use an I2C display for a project. I have installed the LiquidCrystal_I2C, but when I try to upload ...
0
votes
1answer
32 views

Question on pin management using PCA9534PW IO Extender

There is an IO expander PCA9534PW, Arduino UNO. I don’t really understand how I can manage this expander using UNO over I2C. I found an example, but here is the reading mode. What I need: Set the ...
0
votes
1answer
119 views

Possible to connect 3 MPU9250 to Node MCU without multiplixer?

Is the idea of connecting AD0 pins of MPU9250 is still valid like the 2nd answer of this question? - How to change i2c address for mpu9250? I have connected 2 sensor as test. SCL & SDA of both ...
1
vote
1answer
198 views

What does the numbers behind lcd (0x27) means?

I can't seem to figure out what the numbers in after 0x27 means. I understand that 0x27 stands for I2C address and POSITIVE stands for the back light, but what does the other numbers mean? ...
3
votes
2answers
92 views

Need little bit of help on testing I2C sketch

I have this code I got from YouTube for communicating between two Arduinos. By typing 'R' manually into the serial monitor of the 'master' Arduino, the 'slave' will print "Success". I'm trying all ...
0
votes
2answers
182 views

How to connect MPU9250 with NodeMCU using SPI or I2C Slave?

I want to connect 3 MPU9250 sensors, but since there is just one I2C bus, so there are another 2 sensors I want to connect through SPI. Library used - https://github.com/bolderflight/MPU9250/blob/...
0
votes
0answers
61 views

How to interface Arduino with NXP PCA8561 LCD segment driver?

I've just bought few NXP PCA8561AHN LCD segment drivers to do some tests which unfortunately did not went as expected. I'm familiar with expanders and segment LED displays but LCDs seem to be way ...
1
vote
0answers
86 views

Is it possible to use I2C and SPI ons the same Clock line?

I'm trying to connect an I2C OLED display and an n RF24L01 WiFi module to an ATTiny85. But I only need 1 extra pin. Is it possible to use the same clock wire/pin for the I2C and SPI device? Maybe with ...
0
votes
0answers
45 views

SerializeJson not working when using softserial

IDE:1.8.8 Board:Arduino UNO When I use the code below, I get result of print like this. { "result": [ { "ID": "01", "Value": [ "2", "1", "13" ] } ] } But when I use SoftwareSerial and in the setup ...
0
votes
2answers
70 views

Connecting multiple MAX30100/30102 via I2C

I want to connect multiple (up to 4) MAX30100 or MAX30102 oximeter sensors to an Arduino via I2c. But I could not find a solution to change/assign the I2C address. implementing-pulse-oximeter-using-...
0
votes
1answer
54 views

I2C potentiometer mess

I bought a few MCP4651 dual 8 bit I2C pots for a project. After browsing the arduino libraries and finding nothing,"No big deal" I thought to myself ... I've already written I2C libraries for other ...
0
votes
0answers
53 views

What is the difference between the digital temperature sensors SHT31 and DHT11 or DHT12?

I am looking for a digital temperature sensor with I2C interface. I found the SHT31 and the DHT12 (compatible to DHT11). Both also include humidity sensors. And I found libraries for both of them. ...
0
votes
0answers
41 views

Problem I²C Communication between Arduinos

My Problem seems to be that my I²C slave randomly disconnects. I have an Arduino Due communicating with a Arduino Chestnut board (bought hardware). I now measure data with the Due and then send the ...
0
votes
1answer
66 views

ATTiny85 I2C connection with Arduino Nano

I am trying to send and receive data using I2C between an Arduino Nano and an ATTiny85. The ATTiny is mounted on this board: Link I've tried to reach the slave with the simple I2C scanner, but I don'...
2
votes
2answers
130 views

Risks when commanding multiple chips with same address via I2C

I know that I2C devices are supposed to have unique addresses when used. What if I still use multiple devices with the same address, what can go wrong? Let me describe the situation: I have multiple ...
0
votes
0answers
51 views

Buffer to string

I'm a bit of a noob, so excuse if this is more obvious to me than to you. I want to convert a u16 to a string. The u16 is the data coming in from the sensor. I need it as a string, or anything else ...
0
votes
1answer
195 views

Issues with I2C and Wire.Available()

I am working on a project which requires communication from an Arduino Due (Master) and an FDC2214Q1 C to D IC (Slave), but there is some variability as to whether the code works or not depending on ...