The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
0answers
36 views

I2C communication between arduino and raspberry pi breaks under stress for unclear reasons. Why?

I am having a behavior I cannot explain while using arduino mega as a I2C slave for a raspberry pi master. I am showing here an idealised program that shows the issue. I experience pretty much the ...
0
votes
1answer
24 views

Sparkfun CCS811 Air Quality Sensor is just not workin

i have an Arduino uno board and a sparkfun ccs811 sensor. I tried to reproduce the howto from the sparkfun homepage (https://learn.sparkfun.com/tutorials/ccs811-air-quality-breakout-hookup-guide?_ga=2....
0
votes
1answer
23 views

Reset I2C connection with arduino as slave

I am currently using I2C serial communications with arduino as slave and raspberry pi as the master. I am sending sensor data from arduino to raspberry pi. I need to reset the I2C connection once the ...
1
vote
1answer
31 views

Why Wire.write twice?

I'm checking an example for the MPU6050 and got to this part Wire.beginTransmission(0x68); //begin, Send the slave adress (in this case 68) Wire.write(0x1B); //We ...
1
vote
1answer
46 views

Receiving i2c bytes on an attiny85

I've been trying to write a small i2c lib in C over the past week. I managed to get writing to slaves working (for example I can write to an ssd1306 oled) but reading (for example date/time from an ...
3
votes
1answer
103 views

I2C - Confusion

It's not often I ask a question. This one has me a little stumped though. Scenario: I have an 328PB (internal 8mhz), it speaks to a multiplexer on Wire1 (the PB's second IC2 - Minicore lib). The ...
0
votes
1answer
30 views

I2C Communication with the ICM-20789

I am trying to interface with the ICM-20789 over I2C. DataSheet I have been successfully able to get all three gyroscope readings and all three accelerometer readings. I am now trying to get the ...
0
votes
1answer
29 views

I2C Wire.onRequest not detected

I want to know why Wire.onRequest can not detect below massage and what I can do to detect it.(I am not able to change I2C massage) I was able to read this part of the massage with wire.onReceive: ...
0
votes
0answers
26 views

Emulate I2C BMP180

I want to know if possible to emulate a temp sensor such as BMP180 with Arduino. The reason I am asking this is : BMP 180 is obsolete, so I am trying to replace it with BMP280 I want to read the ...
-1
votes
0answers
44 views

When to use Wire.begin method?

I have problem with I2C(second I2C on STM32). I use I2C for SH1106 display(0x3C), DS3231 RTC module(0x68) and AT24C32 EEPROM chip(0x57). Only thing I did is in Wire library changed from TwoWire Wire(1)...
3
votes
1answer
49 views

When I verify the sketch I get several errors

I am extremely new to Arduino coding and have downloaded a sketch for the PCA9685 to use with model railroading and turnout control. When I verify the sketch I get several errors ... I don't even ...
1
vote
1answer
39 views

I2C communication problem with two slaves (atlas scientific) and one Nano (official)

I'm working on a project using an arduino Nano (official) and two peripherals from Atlas Scientific (pH and DO) communicating via i2c. Everthing works fine when i use a usb alimentation connected to ...
0
votes
1answer
43 views

How do you write to a specific register using I2C communcation?

I am trying to write to a charging IC (BQ24193) and I am trying to figure out how to use I2C to write to a specific register so I can set up the charging IC properly. I have watched a few videos on ...
2
votes
0answers
25 views

qMenuSystem using DigoleSerial library doesn’t work on my I2C Monochrome OLED

Just like the title says I’m trying to make qMenuSystem to work with my oled display. Here is what I know so far about my display : - It's a Monochrome OLED 128x64 (Blue) Display - It's connecting ...
1
vote
2answers
96 views

Arduino I2C Wire.onReceive hangs after a few loops

I have an Arduino Leonardo (master) and a Polulu A-star 328 PB(slave). I intend to use the slave to actuate some servos. I've modified the code from https://www.arduino.cc/en/Tutorial/MasterWriter to ...
0
votes
1answer
25 views

qMenuSystem Oled I2C can't make it work

I'm trying to make the qMenuSystem to work with my I2C Monochrome OLED display but without any luck. To summarize all here's what's with it : - the qMenuSystem is using a library called : ...
0
votes
0answers
22 views

Why is I2C OLED failing to initialise when SPI device is added to project (SD.h causing issue)? [duplicate]

My project uses an RTC, GY-521 MPU-6050 3-Axis Gyro and MakerHawk OLED Display Module. All working fine together to show current date and time as well as displaying Acceleration on 3 Axis. I now want ...
0
votes
1answer
31 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
35 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
172 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
29 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
24 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
1answer
58 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
33 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
44 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
106 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
126 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
35 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
61 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
34 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
21 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
107 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
25 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
42 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
39 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
38 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
81 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
73 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
20 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 ...
3
votes
3answers
788 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
17 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
64 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
50 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
51 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
47 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
60 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
30 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
36 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
25 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
40 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 ...