Stack Exchange Network

Stack Exchange network consists of 174 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.

0
votes
0answers
29 views

Control 24 stepper motors in same time via arduino

I want to do myself this project https://vimeo.com/174226879. I refer to this question I2C Master-Slave Arduino system to control array of steppers. In this question are use just 6 stepper motors but ...
2
votes
3answers
139 views

Control I2C relay board from two Arduino Uno

how can I make multi master Arduino device to work with single I2C device? As both the master device are 20 m away from Slave device, I am using the I2C relay board to connect with 2 Arduino boards ...
0
votes
0answers
30 views

Teensy freezing when reading ir sensor

I have a teensy that controls a motor and reads from a ir sensor, GP2Y0E02b. The issue i run into is that at random times the teensy seems to freeze, the main code stops printing but the interrupt ...
0
votes
2answers
55 views

How to manage variable I2C read lengths requiring address incrementation (Wire/I2C/EEPROM IC emulation)

The question is about how to have information/control of a variable length read for an Arduino acting as a slave device. The concrete context is that I want to emulate an EEPROM IC. A byte write to ...
0
votes
1answer
17 views

Resetting I2c Address - MLX90614

I was using my MLX90614 IRTherm sensor flawless and bought two more. I have connected two sensors serial with pull-ups to SDA --> A4 and SCL --> A5. After digging the internet I found out that I ...
0
votes
1answer
23 views

Hot Swap Sensor

Is there a way to have a sensor be hot swappable, as in it can be disconnected and reconnected without locking up the Arduino? I have an I2C sensor that I want to be able to disconnect and reconnect ...
0
votes
1answer
51 views

How do I stop the slave from running the code until master sends a new value? I2C

I'm a total noob when it comes to Arduino. I'm slowly learning stuff. I was trying this code which basically gets input in Arduino1(master) and displays the character in serial monitor of Arduino2(...
0
votes
0answers
50 views

MPU-6050 data over I2C freezing/stopping

Thanks in advance for everyone on this forum always being so helpful. This is the first time that I've had to post a question, because I've always found my answers easily after a quick search - either ...
0
votes
0answers
19 views

OV7670 doesn't respond with Arduino Leonardo [duplicate]

I'm trying to talk to FIFO-less OV7670 module using Arduino Leonardo. I assembled the circuit by analogy with CumputerNerd's projeject with UNO: in my case, I connected: XCLK ---------------- pin ...
0
votes
1answer
34 views

How to change speed of multiple servos acting at the same time with PCA9685 module?

I'm using the PCA9685 module with its Adafruit library. In my code I have one object of the servodriver class that has 14 channels (controlling 14 servos basically). void Positioning(){ ServoDriver....
2
votes
3answers
85 views

How to do I2C on Arduino with SDA and SCL pin already used

i have a Arduino screwshield from sparkfun that I purchased: https://www.sparkfun.com/products/9729 which I used to put between my arduino uno and my 2.8" TFT LCD touch shield so that I am able to use ...
0
votes
0answers
55 views

How to make Arduino i2c master on one bus and slave on another?

I am making a jig to test manufacture of a custom part. The part under test has the properties that it: Takes i2c commands as a slave on an i2c bus, which I'll call the "input bus". Depending on the ...
0
votes
2answers
103 views

Connecting two Arduinos via I2C while I2C Pins A4/A5 are already in use

I have the following problem: Since the BH1750 Sensor only supports two different I2C adresses, but i need to use 6 of those sensors, i wanna use 3 arduinos, 2 nanos, 1 uno and send the data from the ...
3
votes
2answers
144 views

Could I Connect many Arduino Nano boards together?

I want to know if I could connect many Arduino Nano boards together (Example : 10 boards ) , Also i want to know if there is any problem in Communication between them using I2C , could this affects ...
0
votes
0answers
51 views

Sending data with SoftI2CMaster causes LCD to turn off

I am currently trying to use the library SoftI2CMaster to send data to an I2C LCD screen from my arduino nano using pins D2 and D4. The SoftI2CMaster scanner program detects my display, but whenever I ...
1
vote
0answers
58 views

Looking for a waterproof SPI temperature sensor

In my current project I'm using a DS18B20, which seems to be the only temperature sensor to show up when googling for waterproof temperature sensor for an arduino. The sensor itself is fine, however, ...
0
votes
1answer
32 views

Stabilitiy Problem for Interrupts Code related to Flow sensor

There is a problem with code related in link Interrupts Problem with Flow sensor. Code is working but when I stop the pumps, flow value on lcd is frozen until I reset the arduino. And when I start the ...
0
votes
1answer
52 views

Looking for light-weight Arduino OLED library that supports text and bitmaps

I'm trying to incorporate a screen into my Arduino code which is quite large already. The Adafruit SSD1306 library is overly large and has a lot of unnecessary things in it. I've found the ...
1
vote
2answers
91 views

Arduino Uno 2 I2C devices problem

I have two I2C devices connected to an Arduino Uno: an RTC and an OBD interface (see links below). The SCL/SDA of both devices connect parallel to SCL/SDA (respectively) of the Uno. My problem: when I ...
0
votes
2answers
151 views

I2C call during Wire.requestFrom

Which I2C command happen during Wire.requestFrom(address, quantity)? Is it correct that Wire put a Start condition, then 7-bit address appended with read bit? How would that be different from Wire....
1
vote
1answer
1k views

How to choose alternate I2C pins on ESP32?

I'm a begginer with Arduino and this may be a basic question but I'm facing an issue. I'm using a HTU21D sensor with an ESP32. This sensor use I2C communication. Inside the Arduino library, there is ...
0
votes
0answers
52 views

Two Arduino Megas-Connecting through I2C gives wrong values

I have a problem with my Arduino. I am using two Arduino Megas connected through I2C. The master Arduino has two sensors attached to it while the slave Arduino is just supposed to collect data from ...
3
votes
1answer
114 views

Sensor TSL2591 with Arduino Mega

I have three light sensors TSL2591, of signal I2C, that I need to connect (together) to an Arduino Mega. However, I'm not very sure of how share the SDA and SCL pins of the three sensors and I don't ...
0
votes
1answer
359 views

ADS1115 : measuring 5v voltages and powering with 3.3v

I have a project where I need to measure 0 - 5 V. I’m using a ADS1115 to have a better precision, connected to a ESP12. Since the ESP is only 3.3 V tolerant and the ADS powered by 5 V (...
2
votes
1answer
303 views

Communicating with magnetic sensor - TLV493D-A1B6 over I2C

I'm using the TLV493D-A1B6 sensor connected to an Arduino Uno: I've attached all necessary documentation at the bottom. This is a 3D magnetic field position sensor that detects the magnetic field ...
1
vote
2answers
97 views

Is I2C a good option for transmitting data over 200 meters by cable?

Is I2C a good option for such application or are there other protocols? I know that modules like these exists to extend I2C range, and I'm planning to use this one (P82B96). I'd like to use a ...
0
votes
2answers
66 views

How to control two devices with Arduino? [closed]

I want to control two devices: AC Humidifier I have a DHT11 sensor for temperature and humidity. I want the AC to turn on when the temperature is greater than 30°C, and off when it's less than 20°C....
1
vote
2answers
120 views

I2c device disappear from bus after writing

I am currently experiencing a really odd I2C problem on a Atmega32u4 based card. I'm trying to use a TLV493D connected by I2C. I know from this thread that before using this device, I have to set the ...
0
votes
0answers
61 views

Arduno as bridge between two i2c masters

so I am gonna just jump right into the topic. Recently, I have been trying to build a project where I need to connect an ev3 to a raspberry pi. I have decided doing it by i2c after reading (and ...
1
vote
1answer
65 views

How to drive 16 stepper motors with Arduino?

I'm trying to drive 16 of these little steppers on an Arduino Uno. Each test driver uses 4 digital pins for control (2 for each coil) so that would be 64 pins I will need. I'm thinking either ...
0
votes
1answer
628 views

How to make I2C work on RS485?

I'm trying to optimize the communication (minimize wires) on a project where I can control a motor and toggle some 230V devices by using RS485 and I2C. On this project, I'm using an Arduino (Mega) ...
0
votes
2answers
240 views

Minimum value I2C-pull up resistor for arduino

I'm trying to determine the minimum value of pull resistor for Arduino Uno The datasheets says for arduino; VOL = 0,4 for IOL = 20 mA. (VDD = 5V) For formula for calculation of minimal pull-up is: ...
0
votes
0answers
399 views

Can't get I2C + SPI working on Wemos D1 Mini Pro

I've been struggeling allday to get I²C and SPI working on the same time on my Wemos D1 Mini Pro, i want to use a BME280 + the Wemos D1 Mini 1,4' TFT Shield. If i comment one or the other out, the ...
0
votes
1answer
58 views

Decreasing a functions programming size

I have Arduino Code that utilizes the I2CDev library to control an MPU-6050. I am pretty new to coding and copied and pasted most of the code from examples I have found around. I am starting to run ...
0
votes
2answers
192 views

Share I2C pins with other device when lacking GPIOs

We're Using ESP12E as our MCU and we have three functionality : SIM800 connected to TX(GPIO1), RX(GPIO3) Matrix Keypad connected to GPIOs: 14,13,2,10,0,4,5,16 GLCD connected to GPIOs: 15,12 And we ...
0
votes
1answer
36 views

Change values of timer using I2C

I'd like to alter the "LED_T_ON" values using an I2C enabled device (i.e. RPi) Code for Arduino Mega slave: //slave #include <Wire.h> #define SLAVE_ADDRESS 0x08 const int PWR_LED = 43; int ...
0
votes
2answers
180 views

I2C Read Operation in TCA9539

I am using this TI device TCA9539 (http://www.ti.com/lit/ds/symlink/tca9539.pdf) with the pins A1 and A0 tied to ground resulting the write address to 0x74. I don't have any issues writing to this ...
0
votes
0answers
111 views

how to send FFT array consist of 512 Samples Data From arduino to raspberry pi using i2c and this is the code for FFT any Suggestion plz?

#include "arduinoFFT.h" float y, x = 0; #define t PE_0 #define SAMPLES 1024 //Must be a power of 2 #define SAMPLING_FREQUENCY 1024 //Hz, must be less than 10000 due to ADC arduinoFFT FFT = ...
0
votes
1answer
39 views

nodemcu pins + sensors reading values

what are the SDA & SCL pins in NodeMCU? (Pins 20 & 21 in Arduino MEGA2560) I already implemented a simple project to read 2 accelerometers values from Arduino and send them through wifi to ...
1
vote
1answer
96 views

Multiple node network communication over I²C [closed]

I am working on a project where I want to send data from and to different Arduinos on a network. At the moment I²C seems the best option for my needs since I can specify where to send the data. But ...
0
votes
0answers
13 views

I'm using I2C to communicate with a chip, but the chip is taking about 10 minutes to send an IRQ Rising Edge

I'm using an Arduino Uno to communicate with an Si4844-B20. Programming guide here, Datasheet here, Sample wiring diagrams here (I'm using Section 3.1). The communication protocol is I2C. To start up ...
1
vote
1answer
83 views

Teensy 2.0 with MCP23017-E

I've recently bought two more MCP23017-E's for a project, but after hooking them up to my Teensy 2.0 I couldn't get them to react to anything. Suspecting faulty hardware, I hooked them up to an old ...
0
votes
1answer
29 views

3.3v Arduino I2C communication with motor controller powered at ~6v

I am trying to just use the voltage from 4 Alkaline AA batteries in series (6v nominal) to power a motor with the TI drv8830 IC. My question is, will this circuit (specifically just pulling the sda ...
0
votes
1answer
186 views

How can I send and receive data from an arduino uno to arduino mega using I2C?

hello guys I am trying to send data as a string from an arduino uno to another arduino mega and I am a beginner. But I have read about the I2C connection where we connect the RX to TX oppositely. I ...
0
votes
1answer
82 views

Problem using Optiga Trust X I2C

Did someone ever used the Infineon Optiga Trust X module with Arduino using any I2C library ? Here is the technical documentation of the Trust X module. I'm trying to get the I2C_STATE register data ...
0
votes
1answer
250 views

Arduino-compatible micro-controller with both I2C and CAN

I am looking for a controller that works with Arduino (i.e. there is official or third-party support for the controller in the Arduino IDE and core libs) and has both built-in CAN and I2C buses. I was ...
0
votes
1answer
313 views

ToF VL53L1X sensor integrate with arduino

I have this latest version VL53L1X time of flight laser distance sensor: http://www.st.com/en/imaging-and-photonics-solutions/vl53l1x.html I study about this sensor, It says that sensor only Access ...
0
votes
0answers
2k views

NodeMCU (ESP8266) with SPI TFT, I2C RTC, & 2 Buttons, correct GPIO to use?

From all my research it seems that the NodeMCU only has 11 available GPIO (6-11 are used to connect flash memory chip), i'm wondering if anybody can help me with these final connections I have left ...
0
votes
1answer
2k views

MEGA I2C and interrupts on 0,1

Looking at the pinout for the Arduino MEGA: I see that Pins 20 and 21 can be both SDA and SCL or Interrupts 0 and 1. If I'm using an Adafruit I2C 16x2 RGB LCD Shield connected to the SDA and SCL ...
0
votes
0answers
89 views

Using 4 identical sensors on the I2C bus

I am using 4 Pololu VL6180X ToF sensors on the Arduino UNO for a school project but just can't seem to get it working correctly. I understand that I need to hold them in reset and change the I2C ...