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
0
votes
1answer
25 views

Slave to Send Data after Receiving Command using I2C

I want to have my Slave Arduino to send signal to Master after the command was made. But the Slave Arduino does not proceeds to sending the signal after doing the command. What is wrong with my code? ...
0
votes
1answer
26 views

Understanding datasheet of a HCHO gas sensor

I have a gas sensor whose datasheet is attached: DS-HCHO Now it says that UART communication is needed (P2P) where it (module) waits for Data Frame before tx the data frame to host which I need. ...
0
votes
0answers
22 views

Using ESP32-CAM (with ov2640 camera image sensor) to send image via USB

I was trying to obtain image from ESP32-CAM (with ov2640 camera image sensor). I obtained the image through camera web server by connecting the ESP32-CAM and PC to same wifi network. A USB to TTL ...
0
votes
1answer
20 views

Two arduino boards with sensors i2c

I am new and lost I have been searching the internet about how to transfer data of multiple sensors from one Arduino to another using i2c but no luck. all the codes and tutorials online focus on ...
0
votes
1answer
18 views

Setting up I2C with HTU21D, no response after beginTransmission

I'm playing with the temperature/humidity sensor HTU21D. Datasheet: https://www.te.com/commerce/DocumentDelivery/DDEController?Action=showdoc&DocId=Data+Sheet%7FHPC199_6%7FA6%7Fpdf%7FEnglish%...
0
votes
0answers
44 views

Communication with sensor KMX63 in I2C

I trying to use a new sensor the KMX63 with a Arduino Uno board, my sensor is on a evaluation board made by kionix. For the connexion il linked as follows: | Pin Uno | Pin evaluation board | | A5 | ...
0
votes
1answer
32 views

I2C master/slave maximum requestEvent message size

Using a NodeMCU master and an Arduino slave (Wire.h on both sides), is there a maximum message size (32 bytes?) for the answer that the slave sends from requestEvent()? If so, is there any solution ...
-1
votes
1answer
43 views

Arduino detect order of objects

I'm trying to find a way to detect blocks being placed on grid on a table. The table will have fixed places where you can place the blocks, but the user is allowed to place the blocks in any free slot....
0
votes
1answer
45 views

Changing I2C address of MPU-6050

Is it possible to change I2C address of MPU-6050 ? I am trying to connect a bunch of MPU-6050 to my Arduino. Almost all of them are running on the same address. Few are running on different address. ...
0
votes
2answers
68 views

Arduino slave with 2 masters sharing the same I2C Bus?

Consider a scenario where two (or more) master devices (the NodeMCU's, in this case) share an I2C bus with one (or more) slave device(s), like thus: Would this be a feasible setup? In other words, ...
0
votes
0answers
33 views

I2C freeze on master

On my first big Arduino-project I made a game using the following Arduino's and the I2C-protocol: 1x Mega as master 4x Mega as slave 2x Uno as slave The Arduino's controll a physical game where the ...
-2
votes
1answer
55 views

Arduino as Slave on I2C bus to read data from other I2C devices

Good afternoon; I am a bit new to the world of I2C bus. I'm trying to implement a project that have Arduino MEGA as a master and Arduino nano as slave. I have some I2C sensors that i want the slave (...
0
votes
1answer
28 views

Header file or library to test i2c FRAM?

I found a header file to test a i2c eeprom 24LC256, but I used this to test my eeprom CAT24C32.The test sketch works fine. I modified the line BLOCKSIZE 8 because my eeprom have 32byte page write only....
0
votes
1answer
20 views

request for a member “X” in something not a structure or a union

i was programming a Self Balancing Robot, I am writing the code in vscode using platformio extension. when i put the code i need to get the angle out of the gyro in another file (named angle.c) ...
0
votes
1answer
78 views

i2c Connection for MCP4725(Dac) with Esp8266 wemos d1 mini

------------ This question has been edited ------------ note: Dac and Adc is12bits my problem : I use two ESP. Using esp1, I read the Adc amount of the alternating signal (ECG) and send it to esp2 ...
0
votes
0answers
20 views

NFC wont send URL to mobile phone

I'm using nfc 2 click (NT3H2111), I tried via arduino to send data to my mobile phone using this code : #include <Wire.h> int i = 0; int j = 0; uint8_t NDEF_DATA[] = { 0x03, // NDEF Message ...
1
vote
1answer
39 views

about how to write data in the whole EEprom?

I have interfaced AT24c1024 EEprom with ATmega32.AT24c1024, which has 512 pages each of 256 bytes. There are two mode of writing (byte write and page write). In page write mode, it is capable of ...
1
vote
1answer
31 views

Communication between arduino nano and MCP3424 over I2c

I'm am completing a project of mine that uses an MCP3424 i2c 18bit ADC and an arduino nano to measure temperature with an NTC thermistor but am having trouble with the arduino wire library. This is my ...
0
votes
0answers
35 views

Servo PWM Pin seems to be interfering with Wire.onRequest i2C function

A newbie here. I am thinking of interfacing Raspberry Pi with Arduino via I2c to control a few servo motor (as RPi have limited PWM pins). Meaning I would send input from RPi to Arduino to allow to ...
0
votes
1answer
59 views

Software I2C - sending data

I'm trying to read a voltage in from a power supply to an Arduino Micro, then send it to an oscilloscope through an I2C (MCP4725). I would use the default pins on the Micro but I want to wire three ...
-1
votes
1answer
42 views

16/2 arduino I2C lcd display not lighting up?

I am working with an I2C lcd display with an arduino uno board I have connected the gnd pin to gnd of arduino uno and the vcc pin to 5V of arduino uno and the display is not even lighting up there is ...
0
votes
1answer
17 views

Wire SlaveReceiver : will the registered function in onRecieve interrupt/conflict with loop block?

I am currently researching on I2C, and I made a configuration that has MasterWriter that transmits data to a SlaveReceiver that will store the data received from Master, into an SD card, and then ...
2
votes
3answers
758 views

What is the right way to query an I2C device from an interrupt service routine?

The ADXL345, for example, requires that interrupts are responded to by querying the INT_SOURCE (interrupt source) register. In example code for the SparkFun ADXL345 Arduino Library, there is code that ...
0
votes
0answers
16 views

Arduino Setup for RF Transmit and Receive, IR Receive, WS2812 LEDs and a Piezo Speaker

I am new to Arduino and microcontroller in general and just finished one Project (TonUINO - a DIY music box for kids). Now I am planing and working on my next project. A IR shooting range. The guns ...
0
votes
1answer
47 views

i2c slave write to ARM powered device master

I want to communicate to an ARM microprocessor via I2C protocol (Multitech mDot, which uses Mbed platform). I successfully receive data from it (and got it displayed on Arduino's serial monitor), but ...
0
votes
2answers
47 views

Update time in RTC over I2c fails

I am communicating two arduinos using the I2C protocol and sending from the slave to the master the integer value of UTC to update the time in the RTC module. When the master receives the UTC value ...
0
votes
0answers
44 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
1answer
29 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 ...
-1
votes
1answer
36 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
26 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
30 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
24 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
36 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
102 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
66 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
72 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
45 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
45 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 ...
2
votes
3answers
185 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
120 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
60 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:\...
4
votes
3answers
320 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
197 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
27 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
63 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
82 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
95 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
46 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
60 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. ...