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
1answer
27 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 ...
0
votes
1answer
55 views

It is 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 https://github.com/cybergibbons/DS2482_OneWire library but I got errors when I'm trying to run the ...
0
votes
1answer
28 views

How to connect the MPU-6050/GY-521 with an Arduino Mega 2560?

I connected my accelerometer to the Arduino correctly (I tested it without the other sensors and it worked). But then when I try to use it with my other sensors, I get only 0-values (The other sensors ...
0
votes
2answers
66 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 ...
-1
votes
0answers
41 views

FSC-BT625 Bluetooth module (one Master - 10 Slave) with Arduino

I have a project that has #10 slave bluetooth modules. Each of them reads a value by adc and sends it to bluetooth master #. Please explain to me how this is possible. I read somewhere that this is ...
0
votes
2answers
27 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 ...
0
votes
0answers
19 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 (...
0
votes
1answer
54 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 ...
0
votes
1answer
47 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 ...
1
vote
1answer
70 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 ...
0
votes
1answer
29 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 ...
0
votes
0answers
34 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,...
0
votes
2answers
47 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 ...
0
votes
0answers
22 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 ...
0
votes
0answers
39 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 ...
0
votes
0answers
29 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/...
1
vote
1answer
80 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 ...
0
votes
2answers
64 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
0
votes
0answers
23 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 ...
0
votes
0answers
8 views

STM32F103C Connection to MPU6050 Only works less than half the time

I am programming the STM32 Blue Pill board via the Arduino IDE. I have been stuck with this problem for a very long time and it is becoming immensly infuriating. The MPU6050 connects and gets ...
1
vote
2answers
41 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 ...
0
votes
1answer
32 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 ...
0
votes
1answer
28 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 ...
0
votes
0answers
89 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 ...
1
vote
0answers
85 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 ...
0
votes
2answers
45 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(...
0
votes
0answers
53 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 ...
0
votes
1answer
100 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 ...
0
votes
0answers
17 views

nodemcu nack error bh1750

I am trying to run a simple example of bh1750 on my nodemcu, code is #include <Wire.h> #include <BH1750.h> */ BH1750 lightMeter(0x23); void setup(){ Serial.begin(9600); Wire.begin(...
0
votes
0answers
109 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 ...
0
votes
0answers
50 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 ...
0
votes
1answer
84 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 ...
0
votes
1answer
71 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 ...
0
votes
1answer
148 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 ...
0
votes
0answers
29 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 ...
1
vote
0answers
88 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 ...
2
votes
1answer
154 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 ...
2
votes
1answer
124 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
157 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
69 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
132 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
51 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 ...
2
votes
2answers
165 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
51 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
85 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
37 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 ...
3
votes
1answer
59 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
58 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
56 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
55 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 2 3 4 5 12