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
19 views

Using TCA9548A to read 30 ADCs

I want to read 30 differential ended analog sensors. Using ADS1115 16 bit this is possible, but we end up having only 4 address on I2C, so i chose TCA9548A breakout board with 8 I2C multiplex channels,...
0
votes
1answer
29 views

SSD1306 allocation failed when adding a constant

I am trying to get this code working: #include <Button.h> #include <SPI.h> #include <Wire.h> #include <Adafruit_GFX.h> #include <Adafruit_SSD1306.h> #include <RTClib....
0
votes
2answers
31 views

Accessing multiplexed I2C and UART pins of STM32F103 in arduino IDE

I want to access both of the multiplexed I2C and UART pins in the same program. I am programming in Arduino IDE.Can anyone please tell me how to access same pins for different functionalities?
0
votes
0answers
35 views

problem data I2C to sensor GY955/BNO055 (China)

I want to ask, I have a problem when running the Arduino sensor, I can't output data, but it's detecting that the sensor address has been paired. Like I2C has a problem or locks it. Last night it ...
0
votes
1answer
36 views

Docs for using i2C LCD with Newliquidcrystal_1.3.5 library?

I bought a 20x4 I2C LCD from OddWires. (https://www.oddwires.com/20x4-lcd-display-with-i2c-interface/) It came with ZERO specs or documentation. After some hair-pulling I was able to figure out how to ...
0
votes
0answers
24 views

LCD (I2C) issues with pull up resistor

I'm close to finish my first DYI project. But a never seen issue on the breadboard has apprear as soon as assembled. The LCD is always / totally blank/black. When I remove the 4.7 K ohm pull-up ...
2
votes
0answers
49 views

How to use SPI to set/ read registers for a sensor (Avoiding need for Github Lib)

Ok so as some readers might have seen, my current project involves using MPU's. The idea is sending data via CAN bus to a controlling MCU to then send to a raspberry pi to perform the calculations ...
0
votes
2answers
51 views

Bad Communication with Multiple I2C Devices

I have an Arduino Micro connected to two I2C devices. An MPU-6050 that is powered by 5V (though it has its own voltage regulator on it) and a Altimeter that is powered by 3.3V. They are both connected ...
0
votes
3answers
90 views

Multiple I2C slave devices on Arduino - Pull-up values

This question is asked a lot and I've found many usable details on different forums regarding adding pull-up resistors on SDA/SCL lines. I know that only one resistor should be added on these lines ...
0
votes
0answers
28 views

Why is Wire.endTransmission(true) returning 10?

Question: The follow code is printing 10 over and over again (with spaces in between). I have an I2C device connected at 0x60, and nothing connected at 0x61. I'm confused by this because the Wire....
-1
votes
0answers
57 views

Gyroscrope (I2C) with ATTiny85

I'm trying to upload code to an ATTiny85 using a Tiny Programmer. The end result is to use an ITG-3200 gyroscope to trigger a piezo sensor to beep anytime the gyroscope is moved. I was able to code ...
-1
votes
0answers
37 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
151 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
31 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
60 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
32 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
26 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
52 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
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
54 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
102 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
2answers
126 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
196 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 ...
1
vote
1answer
69 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
41 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 ...
1
vote
1answer
75 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
140 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
206 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
2k 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
53 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
124 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
466 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
354 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
98 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
67 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
134 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
68 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
76 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
842 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
390 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
476 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
60 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
217 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
193 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
118 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
46 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
107 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
14 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
97 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 ...