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

LCD displays weird characters

I have connected the LCD by the 3 wire method using the LiquidCrystal595 library+74HC595 register shift; sometimes "hello world" is displayed but other times the LCD displays weird characters. How to ...
0
votes
0answers
303 views

Arduino pulse oximeter max30100 didn't work

I have a school project that help babies who has a heart problem, I'm using an Arduino UNO R3, HC-05 Bluetooth and pulse Oximeter MAX40100(RCWL-0530), and I'm using the library at https://github.com/...
0
votes
0answers
98 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
0answers
109 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 ...
0
votes
0answers
86 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....
0
votes
0answers
77 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
1answer
350 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....
0
votes
0answers
92 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 ...
0
votes
1answer
68 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
288 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
0answers
186 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
600 views

How can I send and receive data from an Arduino Uno to Arduino Mega using I2C?

I am trying to send data as a string from an Arduino Uno to another Arduino Mega. I have read about the I2C connection where we connect the RX to TX oppositely. How to start and send and receive ...
0
votes
1answer
155 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
0answers
5k 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
0answers
166 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 ...
0
votes
1answer
281 views

I2C EEPROM “hangs” on endTransmission()

I am working on the 24LC256 EEPROM, wired as such, except 3.3v to the EEPROM, with 'scope clamped on SDA and SCL. I'm using an address scanner script with a few tweaks, 57600 baud, 10kOhm pullups, ...
0
votes
0answers
451 views

trouble running i2c and spi at the same time

I know this question has been asked before but I am having trouble running I2c and SPI at the same time. I am attaching my code below. The problem when I run the code is that the LED's don't blink ...
0
votes
1answer
43 views

Steppers only vibrate, not rotate with I2C

The goal of my project is to be able to control two steppers with 4 buttons. Steppers are connected to Adafruit Motor shield(the older one) which is stacked on Arduino UNO, buttons are connected to ...
0
votes
1answer
409 views

Reading RAM from SH1106 OLED Controller through I2C

Summary: I'm having trouble with writing a program to get RAM data from an SH1106 OLED controller via i2c. In the first part of the question I've written the assumptions I've made to get informations ...
0
votes
0answers
416 views

Arduino Pro Mini (5v) I2C pullups

I recently bought an ESP-WROOM-32 module and I want it to talk to my Pro Mini via I2C. Do I have to pull-up the lines to the 3.3v side (ESP32)? Since the Pro Mini runs at 5v, I think it's a bad idea ...
0
votes
1answer
471 views

LSM9DS1: Inconsistent data from an accelerometer

I'm currently getting inconsistent data from the accelerometer of my Adafruit LSM9DS1. To be more precise I either get a value close to the correct gravity (eg. 9.496515) or some reading like it was ...
0
votes
0answers
291 views

Arduino SPI and I2C Combo [duplicate]

We are trying to communicate between 2 Arduino's (1 Nano and 1 Mega) and a Raspberry Pi. This communication works till we add an SPI Connection to our RFID Scanner (RC522). We ran into the problem ...
0
votes
1answer
107 views

The Wire library and an ATTiny88 MCU

This is the MCU: http://www.microchip.com/wwwproducts/en/ATtiny88 - it advertises a hardware I2C interface, but I am struggling with it. It is mounted on my own board (which worked fine if I dropped ...
0
votes
1answer
1k views

I2C requesting more then one byte

I got an Arduino Uno set up as an I2C master to an ATtiny85 slave, using the Wire (Master) and TinyWireS (Slave) libraries. Communication works good. I have been able to keep the network running ...
0
votes
1answer
45 views

How do i fill the second byte?

I am using I2C communications to control a AD5694RBRUZ (http://www.analog.com/media/en/technical-documentation/data-sheets/AD5696R_5695R_5694R.pdf) with my Arduino Nano. If i enter two bytes it wil ...
0
votes
0answers
30 views

ADXL345 hangs the microcontroller as vibrations increase [duplicate]

I am using ADXL345 accelerometer with Adafruit_ADXL345 library for vibration measurement. I am reading acceleration at X, Y, Z-axis of a sensor placed on a vibrating platform.And serially sending it ...
0
votes
0answers
153 views

HMC5883L stops reading when x-axis value get to positive value

I've been looking for a solution for this problem for quite a time I tried different I2C libraries; like, I2C master library using hardware TWI interface * Author: Peter Fleury But the same ...
0
votes
1answer
1k views

Wire library compatibility Arduino Pro Mini - nodeMCU (I2C/TWI) problem

I'm writing PortExtender, a library to convert an Arduino Pro Mini in a port expander and I ran into what seems to be a compatibility problem between Arduino and nodeMCU: I got different answers ...
0
votes
1answer
896 views

How to interface OV5640 to Arduino Mega using Embedded C? [closed]

I am trying to interface a OV5640 camera module to Arduino Mega 2560 in Eclipse IDE using C language . However I am not able to figure out the registers that need to be initialised , for the camera to ...
0
votes
0answers
240 views

Are (how much are) interupts interfering I2C or SPI communication?

I am thinking over an autonomous rover. One of the features/components of the rover will be ability to know how fast is the rover moving and what distance did it travel. I would like to use ...
0
votes
0answers
178 views

Arduino Mega 2560 to Adafruit STMPE610 wiring

I'm having difficulty in trying to find the correct wiring between the STMPE610 to the Arduino Mega 2560? Q: Could someone please illustrate the correct wiring for i2c connection between the two ...
0
votes
1answer
174 views

I2C begginer with I/O expander with mega328p C code

I've just started with the I2C protocol. I read about it in the datasheet, other documents, blogs and videos. So, I started to develop my code and I think I did my first success, I succeeded to send ...
0
votes
2answers
790 views

Having problems with I2C - Slave is receiving “b ~ ,,,”

so I'm facing a pretty large problem. I'm experimenting with I2C and using one Arduino that acts as a countdown timer to send the current reading on the timer to another Arduino. I'm pretty new to ...
0
votes
1answer
361 views

How to connect gyro to Arduino Uno via I2C

parts Three-axis rate gyro on breakout board: gyro datasheet, breakout board "datasheet" Arduino Uno: pinout goal: I want to periodically read a single axes' angular rate. As rvbarreto pointed out, ...
0
votes
1answer
2k views

MPU-9250 IMU on SPI, external sensor or magnetometer using I2C master

I'm trying (for sport...) to use an MPU-9250 in SPI mode as it should be faster, and wasn't able to talk to the embedded magnetometer in my code. I've gone through the documentation (RM-MPU-9250A-00 ...
0
votes
1answer
120 views

I2C between 2 or more Arduino boards

HELLO I have already connected with I2C 2 Arduino's all is working with comunication on Bus I2C. My Setup is : MASTER with LCD I2C , RTC1037 SLAVE some sensor not I2C I allready put 2 pullup resistor ...
0
votes
2answers
897 views

Tiny RTC I2C module not working

I bought a Tiny RTC I2C module and it doesn't work. When i run the TimeRTCSet from TIME library all i get is: Unable to sync with the RTC 0:00:00 0 0 1970 0:00:01 1 1 1970 0:00:02 1 1 1970 0:00:03 1 ...
0
votes
2answers
2k views

Two-way communication on multimaster I2C bus

I'm trying to send data both ways between an Arduino Mega 2560 slave and 2 Arduino Nano Zero (ATSAMD21G). This example is a simplified setup and code. There will be more masters along with passive ...
0
votes
2answers
698 views

I2C conflict with 2 Arduinos

I am having some trouble connecting my 2 Arduino Nanos with I2C. I have this configuration: SLAVE RECEIVER Nano with DS1037 and LCD 16x02 on I2C. MASTER SENDER Nano. After some time the Slave ...
0
votes
2answers
238 views

Common/standard library and/or protocol for Arduino to be I2C slave for driving NeoPixel

I would like to control a string of WS2812/NeoPixels from a SBC like a BeagleBone or C.H.I.P. I realize someone has gone through the trouble to come up with a way to drive the WS2812 string from a ...
0
votes
1answer
529 views

How to make PCA9685 work with Arduino Due?

I have Arduino Due and PCA9685. I use this library: https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library The board does not do anything with servo connected. I tried to use SDA/SCL pins and ...
0
votes
0answers
61 views

Inexpensive way of connecting a lot of modules on a distance

I need to connect a lot (~100) of modules with a computer (Raspberry pi). The modules are based on Arduino micro and are very simple. They will be spread around, but for the two adjacent the distance ...
0
votes
2answers
637 views

I2C communication between 2 Arduinos with updated wire library

I would like to enable communication between two Arduino 101. From what I have read, the best method is to use I2C using the wire library. However, it seems as though the newest Arduino IDE has an ...
0
votes
1answer
45 views

Accelerometer Z Value off a significant amount, all other values reasonable

I'm using the MPU9255 Accelerometer to measure acceleration in the X,Y, and Z directions. As per the datasheet, I've applied a scaling to the raw digital values based off of whether I specified +- 2G,...
0
votes
1answer
746 views

ADXL345 I2C setup not returning anything

My hookup is like this: GND - GND VCC - 5V CS - 5V SDO - GND SDA - A4 SCL - A5 Here is the code: #include <Wire.h> #include <ADXL345.h> ADXL345 accelerometer; void setup(void) { ...
0
votes
2answers
626 views

I2C multi sensors reading on Arduino

I have several sensors (Grove multichannel gas sensor, Air Pressure Sensor MPX4115A, Temperature and Humidity Sensor DHT11) where most of them uses I2C communication. I wonder if it is possible to ...
0
votes
1answer
4k views

esp8266-01 and arduino UNO communicating over i2c

i am not able to communicate over i2c with my esp-01 as master and UNO as slave. i get special characters sent back to esp, but my esp is sending correctly... output on my esp-01 output on my UNO is ...
0
votes
1answer
685 views

scroll text through multiple i2c connected dot matrix displays

I have 4 dot matrix displays, every one of them connected to an i2c and accessible with 0x70, 0x71, 0x72 and 0x73. All these work just fine when I address them apart. What I want to achieve is a ...
0
votes
4answers
3k views

Strange problem. Arduino stops working after few hours. Opinions please

I am trying to setup an automated relay for my aquarium. The Arduino should switch off the pump every 3 hours for 20 minutes, and feed at particular times during the day. The code works fine for the ...
0
votes
1answer
512 views

Arduino UNO inconsistent I2C register reading from ArduCam

I have an Arducam hooked up to an Arduino UNO. The code I am running looks like this: #include <Wire.h> #include <ArduCAM.h> #include <SPI.h> #include "memorysaver.h" const int CS ...