Skip to main content

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
1 vote
1 answer
687 views

i2c scanner stuck on scanning for my 0.96in OLED screen with my Arduino Nano

My pins are connected as follows; vcc-3v3, gnd-gnd, sda-A4, scl-A5.
peterk's user avatar
  • 121
1 vote
2 answers
623 views

Arduino program using i2c stops working after printing to OLED a few times

A NOTE ON THE PROJECT AND PROGRAM STRUCTURE I am developing an open source Smart Watch project using Arduino. The code can be found here: https://github.com/shivangsgangadia/SmartWatch The code is ...
Shivang Gangadia's user avatar
1 vote
0 answers
229 views

Problem with I2C

I trying to make a project to write and i2c display from a renault megane vehicle. There is many people showing it but there is no code that i can use. So i buy a cheap analyzer and i can clearly see ...
Javilico's user avatar
2 votes
3 answers
467 views

Unable to find/connect I2C devices (SHT31 & SGP30)

I have recently purchased an Arduino Nano 33 IOT together with two sensors: Adafruit SHT31-D (https://learn.adafruit.com/adafruit-sht31-d-temperature-and-humidity-sensor-breakout) Adafruit SGP30 (...
YouKnowNothingJohn's user avatar
1 vote
1 answer
1k views

Problem to Setting up i2c OLED wemos D1 mini shiled (64*24)

Hi I used this shield before well. But it didn't work when I wanted to work with him last night! this is my wireing : Now I want to know how to test that it is healthy? Is i2c address missing or ...
navid's user avatar
  • 25
2 votes
1 answer
91 views

Pca9685 & WS2818B, 1 Nano

Arduino n00b here. I currently have an Arduino Nano set up to run 6 servos from a PCA9685 board. I'm looking to add 6 switches and 6 LED indicators to switch servo positions. What I'm curious about is ...
brbecker87's user avatar
0 votes
1 answer
245 views

How can I declare custom pins when using with ESP8266 in MPU9250 library

I want to declare SCL and SCK pins like Wire.begin(sda_pin, scl_pin); to use with ESP8266 to integrate a MPU 9250/6500 sensor. I can't figure out a way to declare that in this code exaample provided ...
Isara De Silva's user avatar
1 vote
1 answer
1k views

I2C and softwareserial

Attempting to make gps unit with screen. GPS unit communicates over serial (Adafruit Ultimate GPS Breakout) and I can get GPS data through USB to my pc with Adafruit GPS library softwareserial ...
Rob's user avatar
  • 21
1 vote
0 answers
45 views

BMP280 pressure as a DC motor switch - issues

I'm attempting to control a DC vacuum pump to turn off when it hits a BMP-280 reads a set pressure lower than when it spins up (guesstimate pressure, I've got it hooked up to tweak in person). ...
Andrew Soviak's user avatar
1 vote
0 answers
607 views

I2C and SPI using sensor and Oled display

Im currently working on a project which displays vital signs such as pulse and oxygen on my display. Now, my sensor is connected through I2C while my OLED runs through SPI. Im trying to display the ...
Shaukatali Z Hussein's user avatar
1 vote
0 answers
333 views

ESP8266 NodeMCU CP2102 ESP-12E I2C with MPU 6050 Error

So the previous two questions could be found here: ESP8266 computtion error and ESP8266 not working with MPU 6050 over wire library and I2C However, it was not resolved, and with updates and debugs,...
ShoutOutAndCalculate's user avatar
0 votes
1 answer
943 views

Is it permissible to connect 3.3V powered devices to the 5V I2C bus?

I have several devices on the I2C bus: RTC DS3231SN TMP100 temperature sensor EEPROM 24LC256 All devices are powered by 3.3V. The voltage on the I2C bus is 5V. Question: Is the voltage difference ...
Delta's user avatar
  • 263
0 votes
0 answers
222 views

Connecting Arduino Uno to Arduino Leonardo

I have an RFID shield connected to my Arduino Uno, but I want it to be able to send keystrokes to the computer when I scan the correct card. I have the Uno set up correctly so that when the card is ...
Ryan Vogel's user avatar
0 votes
2 answers
941 views

ESP8266 not working with MPU 6050 over wire library and I2C

I'm trying to use this version of ESP8266 to access MPU 6050. However, it's not working. https://www.amazon.com/gp/product/B07HF44GBT/ref=ppx_yo_dt_b_asin_title_o07_s00?ie=UTF8&psc=1 i.e. ...
ShoutOutAndCalculate's user avatar
2 votes
1 answer
151 views

i am having Strange issues when trying to read form gps serial connection

I have an Adafruit Ultimate GPS connected to a MEGA2560. I am trying to get the data from the buffer and do other data processing at the same time, however. when i allow other processing to be done ...
Oliver Taylor's user avatar
0 votes
2 answers
2k views

OLED (I2C) and Micro SD card module not working together in Arduino

I am trying to write some data to SD card and read it back to serial monitor as well as display it to the OLED. Both the sd card and oled work separately but they seem to be interfering with each ...
Rohan's user avatar
  • 49
0 votes
1 answer
146 views

How do i send data from a Master to another Master?

I am using an ESP32 to receive data from web. However in an I2C communication, the EPS32 does not work as a Slave and i already have an Atmega as the Master. i have seen sites saying Master-Master ...
Julius's user avatar
  • 91
0 votes
1 answer
918 views

Is there any DS2482 I2C to 1-Wire bridge functional library?

Please let me know if you know any good library for DS2482 I2C to 1-Wire bridge. I tried to use the DS2482_OneWire library but I got errors when trying to run the library examples (Read_temp_sensors ...
Marian Tudor's user avatar
1 vote
2 answers
3k views

Best way to send I2C commands between Arduino and ESP32

I made a board with an Arduino nano and a ESP32 Dev kit. I connected them via I2C with voltage adaptation. I'm using arduino IDE and the related library Wire.h. I send messages as ascii chars or ...
daigs's user avatar
  • 11
0 votes
1 answer
257 views

Cannot call function in call back for onRequest()

I am a NOOB! Trying to use the ZS-042 RTC module to retrieve the current time and send it back to the RPi over I2C. I can call the function and spool it to Serial but when I try to call the function ...
Brian's user avatar
  • 9
1 vote
0 answers
193 views

I2C Communication Matlab - FDC1004

I have a ProtoCentral FDC1004 board (datasheet: http://www.ti.com/lit/ds/symlink/fdc1004.pdf) connected to an Arduino. I am then trying to connect to the system via matlab. I have found the address (...
Tom Fisher's user avatar
-1 votes
1 answer
2k views

Parallel communication between multiple Arduino

Here's a post which explained the communication standard. I need to establish communication between multiple Arduino nano board. I have used SPI bus on one of the Arduino board for wireless ...
ShoutOutAndCalculate's user avatar
-2 votes
4 answers
3k views

SSD1306 recognized in I2C scaner, can't get it to display

The gist of my issue is in the title. I have a cheap ebay SSD1306 128x64 display which I hooked up to my arduino, and checked the wiring at least 50 times and the address is correct, the display has ...
Xilog's user avatar
  • 19
1 vote
1 answer
958 views

I2C OLED conflicts with Interrupt

I'm using Nmradcc.h in combination with a OLED I2C. The nrmadcc.h is using a interrupt 0 on Pin 2, the OLED uses A4 and A5. After initialisation of the OLED and the Function The problem is, I can ...
Bert Booltink's user avatar
0 votes
1 answer
533 views

How many I2C lines does the Arduino Due have?

According to the Arduino pin Mapping 20 PB12 SDA 3 6 21 PB13 SCL 3 6 70 PA17 SDA1 3 6 71 PA18 SCL2 15 9 The first one seems pretty obvious, the second one though is ...
Jack's user avatar
  • 213
1 vote
0 answers
115 views

I2C sensor hogs the bus with empty write commands

I am trying to read data from a pair of TLE493-W2B6 magnetic position sensors [1, 2] with Arduino over I2C. I can read from each sensor individually, using the Arduino library from the manufacturer [3,...
Zach Morris's user avatar
-1 votes
3 answers
569 views

USING HX711 ( WITH LOADCELL) WITH PCF8574 IN NODEMCU

I have used hx711 and loadcell with nodemcu (esp8266) in its D1 and D2 pins ( here I have used Logic level shifter and a 5v supply to power hx711).It worked perfectly fine. Due to the lack of enough ...
noon masho's user avatar
1 vote
1 answer
228 views

MPU6050 - Why is my gyro integration incorrect?

My situation: I am able to communicate over i2c with my MPU6050 IMU I can get accelerometer and gyro data I can compute the sensor's orientation using my accelerometer Issue: when trying to compute ...
traducerad's user avatar
1 vote
0 answers
199 views

Problem with printing keypad input to the LCD in a while loop

this is my first post here, though I have been following this forum for a while (pun intended). I am trying to write a program for a machine that will drill holes in a metal rail, and cut the rail to ...
Andrija Erovic's user avatar
1 vote
0 answers
1k views

I2C Hangs (sometimes) when Wire->endTransmission() is called

Architecture MKRZero BME280 Atmospheric Sensor SSD1306 128x64 OLED Screen SparkFun GPS: device: https://www.sparkfun.com/products/14414 arduino library: https://github.com/sparkfun/...
T. Brian Jones's user avatar
1 vote
1 answer
3k views

How to get text to flash on ssd1306 i2c screen

I am trying to alternate a string back and forth on the SSD1306 oled screen. So I want the display to show "test1" for 0.5 seconds, then "test2" for 0.5 seconds, repeating. the code below is just ...
MattG's user avatar
  • 117
1 vote
2 answers
2k views

How to send data to multiple slave at a time

I have one master and three slave devices and i need to send data to all the slaves at a time.is that possible if so how to check which slave has recieved the data first
PRASH's user avatar
  • 11
0 votes
0 answers
162 views

MPU6050 with Arduino I2C Unreliable with Motor Noise

I have an autonomous wall-tracking robot that uses relative angle changes from a I2C-connected MPU6050 module along with ultrasonic 'ping' sensors for motor speed control to acquire and then track a ...
starship15's user avatar
1 vote
2 answers
522 views

How to check if two device has the same address on I2C?

I start a new project with Arduino UNO and MCP23017 expander. Using this, I can connect 8 chips on Arduino, by selecting different addresses ( from 0x20 to 0x27 ). My question is, if I connect two ...
Alin.B's user avatar
  • 11
0 votes
1 answer
195 views

Compass heading not varying linearly

I am using an HMC-5983 magnetometer compass on my arduino uno to find the heading of a car I'm building.But my compass readings aren't varying linearly.For example when I physically turn my compass by ...
AfiJaabb's user avatar
  • 219
2 votes
1 answer
148 views

FIXING BUG when Using Wire library to obtain compass heading

I am using the HMC-5983 magnetometer module to obtain the compass heading of a autonomous car I am building using the arduino platform.I'musing the Z axis and X axis to obtain the heading. However ...
AfiJaabb's user avatar
  • 219
1 vote
0 answers
1k views

Arduino nano with 128x64px OLED freezing

I have an arduino nano, MCP3424 i2C ADC and a 128x64px i2C OLED display. The function is quite basic; the arduino receives information from the ADC and prints it to the screen as described in the code ...
Asyu7's user avatar
  • 33
0 votes
1 answer
928 views

Reading I2C data from SW6106 register

I am using the SW6106 powerbank IC as an I2C but no matter what I have tried I couldn't read something other than "FF". Datasheet for the IC. Timing diagram for reading data: Timing diagram for ...
efe's user avatar
  • 9
0 votes
2 answers
414 views

What is the best data type to be used through i2C

i'm trying to send multiple commands to multiple slaves controlling motors. Slave Controller(Arduino Nano) will receive the command, and returns the current position of the motors to the Master(...
Julius's user avatar
  • 91
1 vote
0 answers
324 views

i2c man in the middle

I'm developing a bridge, or man in the middle for touch controller and a system board connected with I2C. The connection is: Touch Controller(slave)---I2C---(master)STM32(slave)---I2C---(master)ARM ...
Libor Tomsik's user avatar
0 votes
1 answer
614 views

I2C code working on Mega 2560 but not on Uno and nano

I have recently purchased this Heart rate sensor and was trying to make it work. I used this MAX30100 library I found on Github. For some reason when I use any of the given examples, they seem to work ...
Prateek Dhanuka's user avatar
1 vote
0 answers
126 views

Completing an action on button release help with delaying to give other modules time to repond

I'm currently having problems with my code it has several modules within the main one is my current keypad one working of a mcp23017. what I needed it to do is count how long a key is pressed and upon ...
Apple's user avatar
  • 11
1 vote
0 answers
61 views

Byte not written to the memory

In the following code I'm computing crc and setting it as last (11th) byte in the array. The problem is it's sent on I2C just when I print it on the serial terminal. static constexpr uint8_t ...
Libor Tomsik's user avatar
0 votes
1 answer
2k views

MCP4725 I2C address

I want to use four of MCP4725 DAC module at the same time but it only has two I2C addresses which can be set via jumpers: In page 10 of the datasheet it says: Device Address Selection pin. This ...
ElectronSurf's user avatar
0 votes
1 answer
1k views

Sending more than BUFFER_LENGTH(32) bytes in slave answer I2C

I need to send 259 bytes as answer to I2C master read request. AFAIK there is a buffer limit of 32 bytes in Wire.h and in HW (Arduino Nano). Is there a way sending 259 byte answer, or I have to choose ...
Libor Tomsik's user avatar
-1 votes
1 answer
1k views

Connect arduino nano and ESP32 with I2C on the GPIO7 and GPIO8?

I made a mistake connecting SD0 (GPIO7) and SD1 (GPIO8) with the SDA and SCL on my arduino nano. I got confused with GPIO21 and pin21 and GPIO22 and pin 22! Since I made a PCB prototype, I would ...
daigs's user avatar
  • 11
1 vote
0 answers
249 views

Communication between arduino nano and MCP3424 over I2c pt. 2

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 ...
Asyu7's user avatar
  • 33
1 vote
0 answers
1k views

ESP32: Share I2C bus among multiple freeRTOS tasks - do I have to expect synchronization issues?

I recently inherited some firmware with weird problems in regards to the duration of reading sensor values. The board is based on the ESP32 Wrover MCU and has multiple sensors connected via the I2C ...
Nodebody's user avatar
  • 111
2 votes
1 answer
440 views

OLED display hectic behavior - interference with other parts of the code?

Disclaimer: I'm a total novice to Arduino so please forgive me if the question may seem trivial, I'm trying my best to learn :) I'm working on a small project where I have a fingerprint sensor, a ...
HaXeT's user avatar
  • 21
2 votes
1 answer
262 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 ...
Stefano Borini's user avatar

1
3 4
5
6 7
16