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

Two Arduino boards with I2C sensors

I have been searching the internet about how to transfer data from multiple sensors from one Arduino to another using I2C, but no luck. All the code and tutorials online focus on multiple slaves with ...
0 votes
1 answer
64 views

Unable to find PCA9685 module when using the I2CScanner library: no servo movement

I am trying to use an Adafruit PCA9685 servo driver module with an ELEGOO Mega 2560 board. I am supplying the servo driver board with 5 V and tested all the wires to make sure. I tested the servo ...
0 votes
0 answers
25 views

I2C: Nano vs Nano 33 BLE

I am using the following sketch: // SPDX-FileCopyrightText: 2023 Carter Nelson for Adafruit Industries // // SPDX-License-Identifier: MIT // -------------------------------------- // i2c_scanner // // ...
0 votes
1 answer
878 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 ...
0 votes
1 answer
44 views

Updating multiple Arduino Nanos with same INO file

BTW - I have, unsuccessfully, searched for an answer before posting. I have an NodeMCU connected to a bunch of Arduino Nanos over the I2C bus. The WiFi-enabled NodeMCU has the capability to do OTA ...
2 votes
0 answers
62 views

MPU9250 and MPU6050 not working with SAMD21 board

I am trying to use an MPU6050 with my SAMD21-based board (a LightAPRS W-2), but it doesn't work. The sensor definitely works, as I can get data from another 3.3 Vlogic-level board, and the sensor ...
1 vote
1 answer
1k views

DS3231 RTC not working with ESP32

I am using ESP-32-WROOM-32 with a RTC DS3231 module. I have connected SDA & SCL pins of RTC DS3231 with ESP32 D22 and D23 pins. Also, the VCC of RTC is connected to 3V3 of ESP32 and the GND of RTC ...
1 vote
2 answers
154 views

DHT20 and OLED display not working together

I am trying to get my DHT20 and OLED (both from the Arduino Sensor Kit) to work at the same time. I am able to get them working separately with their respective test codes, but when I try to combine ...
-1 votes
2 answers
67 views

Do I connect multiple I2C units to the microcontroler in series or parallel?

I have a project (still planning) with three I2C sensors: GPS, 3-axis gyro+accelerometer, and OLED. Do I connect SDA/SCL in series, or do I connect them in parallel?
1 vote
1 answer
339 views

LILYGO TTGO T-Display cannot detect MPU 6050 Accelerometer, Gyroscope and Temperature Sensor

I've been trying to connect a MPU 6050 Accelerometer, Gyroscope and Temperature Sensor to a LILYGO TTGO T-Display to get readings displayed on the serial monitor (for starters). The wiring is pretty ...
0 votes
1 answer
124 views

Use class object inside an ISR

I have to simulate an ADC that behaves as an I2C slave. The simulated values that the ADC shall expose are sent over serial, saved on an attribute and are requested by a master device over I2C. A ...
2 votes
3 answers
433 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 (...
3 votes
2 answers
12k views

I2C and SPI at the same time?

I would like to ask a question relating to the following communication setup: STM32 -- Arduino Pro Mini -- ADNS3080 sensor The interface between STM32 -- Arduino is I2C and the interface between ...
1 vote
0 answers
673 views

Using MPU6050 with ESP32 Cam- MPU Not Detected

Hi I'm trying to build a self balancing robot using my esp32 cam, but so far I haven't been able to setup my mpu6050 with it.I'm using the adafruit libraries with the given example sketches. The only ...
2 votes
1 answer
117 views

Get address of a I2C transaction when multiple addresses are registered

I have an application polling 4 ADCs by I2C. The application shall also write on some ADC registers. In order to test it, I'd like to use a single Arduino UNO, enabling it for receiving I2C messages ...
0 votes
0 answers
154 views

Connecting Multi MPU6050 using I2C on ESP32 Wroom 32D

I want to connect two MPU6050 sensor on Esp32 using the I2C protocol. ESP32 to MPU6050 connection, I'm using - VCC(ESP32) - VCC(MPU6050_1) - VCC(MPU6050_2) GND(ESP32) - GND(MPU6050_1) -...
-1 votes
1 answer
34 views

The code is showing same angles for all three axis in the mpu gyro. can anyone solve it so that it works

#include<avr/io.h> float x, y, z, baf = 0, j, i = 0, k, angle, a, b, c, d; unsigned long current_time = 0; unsigned long previous_time = 0; unsigned long time_interval = 0; float gyro_offset_x = ...
2 votes
1 answer
127 views

Sparkfun ISL29125 breakout board issue with Arduino IDE with ESP32

I am working on a project where I need to get the RGB light value from surrounding ambient light. For that I am using an ESP32 with a Sparkfun ISL29125 breakout board. I have tried to scan available/...
-1 votes
1 answer
205 views

6-pin BME280 not giving I2C signal

I'm creating a telemetry package for my my mom's model rocket with a MPU6050, a BME280, and a SD reader/writer. The code I found for the BME does not read any information. When I upload an I2C scanner,...
4 votes
2 answers
433 views

How to change the I2C address of the AS5048B?

I saw this video from James Bruton. See the links to the GitHub repos in the video description. I bought a few AS5048B boards from AMS, so I can measure the position of my stepper motors. In the ...
0 votes
1 answer
250 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 ...
2 votes
1 answer
802 views

Reading I2C registers as slave device

I need to read the registers of a message gotten from onReceive(). I read here that There's nothing "magic" about the register pointer: it's simply the first data byte in the packet. So ...
0 votes
1 answer
116 views

Arduino pulls i2c bus down

I am building an airplane. As a controller I am using a Raspberry pi 4. There are 3 sensors (MPU6050, QMC5883L, BME280) and arduino pro mini connected to the raspberry via i2c. When sending requests ...
0 votes
1 answer
628 views

How to send an array of unknown size via I2C (from slave to master)?

When I try something like this, everything works. Slave: # define DEFAULT_DATA_SIZE 256 byte DATA[DEFAULT_DATA_SIZE]; void requestEvent() { Wire.write( (byte*) DATA, ...
2 votes
1 answer
126 views

How to make 2 lidar lite v3 work with 1 Arduino?

I'm using the code below, but I had no success. I'm using this connection wire: The photo of the Arduino doesn't show the SCL and SDA pins, but please consider that it has 2 SCL pins and 2 SDA pins in ...
2 votes
1 answer
90 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 ...
1 vote
0 answers
165 views

How to use multiple PN532 over i2c bus(es) and SPI?

I am working on a project that involves 3 PN532_modules to an ESP32, which sends the Tag_ID over BLE. Plan A was to use One module on i2c_1, second on I2C_2 and third over SPI. The SPI one works as ...
0 votes
2 answers
124 views

How much readable text can fit inside an ATTINY85? Feasibility of scrolling a booklet on a 0.91-inch OLED display

I'm a total beginner, so I've been talking with Chatgpt regarding the capabilities of the Attiny85 microcontroller. But the AI would hallucinate a lot and give only partially right answers (because it ...
2 votes
1 answer
156 views

LCD I2C connection problems

I am hoping there is a simple fix to this problem. I am playing around with a 16x2 lcd with a I2C connector attached. I wired it up to an elegoo uno R3. I started with some code I've used before and ...
1 vote
1 answer
59 views

Can I program ATTINY using Arduino as ISP whilst having other I2C devices connected? [closed]

I have an SMD ATTINY that I'm using for a project. Attached to it are 3 I2C devices. When programming it using an Arduino as an ISP, can I have those devices attached? Ie, do I have to program the ...
2 votes
1 answer
77 views

I2C cabling rules for 2+ devices

I'm attempting to wire two breakout boards with i2c devices to a Mega2560: a HD44280 LCD with PCF8574 i2c backpack a combo board with DS1307 + AT24C32 There are two obvious possibilities for cabling:...
0 votes
1 answer
1k views

Sparkfun CCS811 Air Quality Sensor is just not working

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....
5 votes
2 answers
301 views

Arduino Freezes (probably because of I2C) - Need help to write robust script

Arduino Pro mini 3.3V stucks few hours after startup. After repowered, it begins to stuck within a few seconds. If I wait long enough before turning it on it stucks little later for example now it ...
4 votes
1 answer
109 views

How do you take the simplest continuous reading from a Garmin Lidar Lite V4 using I2C on a Particle Boron v4.1.0?

Hey there Stack community. I'm working with the Particle Boron v4.1.0. I'm connecting a Garmin Lidar Lite V4 on I2C. I'm using the LIDARLite_v4LED.h header file found in the library given for this ...
1 vote
1 answer
3k views

I2C requesting more than 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 well. I have been able to keep the network running ...
2 votes
0 answers
340 views

Scrambled Text on SSD1306 Using ESP32-S2

SSD1306 OLED display connected to an ESP32-S2 over hardware I2C. I noticed that the text will sometimes get scrambled or lag during a screen update. When left running long enough, the screen will get ...
3 votes
0 answers
129 views

Using 2 VL53L4CD ToF sensors and getting error after getting first reading

pretty new to arduino stuff and was hoping to get some help with my code. I'm trying to use 2 ToF sensors and get continuous readings from them. I understand that I have to use the xshut feature and ...
4 votes
2 answers
341 views

I2C sensors not working when I connect to LCD 20X04

I am making a hydroponic nutrient monitoring system using Arduino Uno, Atlas Scientific EC sensor, pH sensor, and RTD (temperature) sensor in I2C mode. I also want to use LCD 20x04 to display the ...
0 votes
1 answer
441 views

NodeMCU V3 and MPU6050 strange values

I am new to this platform, so please if I do something against the regular rules please let me know so I can learn. Now my problem: I have a nodeMCU V3 connected to a MPU6050. Using my Arduino Uno I ...
0 votes
1 answer
136 views

Can you coax another I²C connection out of an Arduino Nano Every?

I'm looking to network a bunch of devices (boards in a Eurorack case) over I²C, but I don't want to compromise the address space available to each individual device for its own needs. The obvious ...
1 vote
0 answers
476 views

LiquidCrystal_I2C, lcd.begin() causes runtime error on Arduino Mega2560

I have tested the library and LCD with simple script and everything worked fine. Now I am trying to add the LCD functionality to my working program but the code reaches the lcd.begin(); function it ...
1 vote
0 answers
145 views

Pool pump man-in-the-middle SDA/SCL with ESP32

Hey all I have found some code on GitHub that works with my pool pump but it seems my model is a little newer than the one they used on on their GitHub. Most things seem to work but what doesn't is ...
1 vote
0 answers
96 views

LIS3DH not working with arduino

I am new to LIS3DH and tried to interface it with Arduino Uno. I have made the circuit as follows- LIS3DH : Arduino Uno SCL : SCL (GPIO18) SDA : SDA (GPIO19) 3.3v : 3....
1 vote
1 answer
1k views

Random artifacts on SSD1306 OLED screen

I'm having a really strange problem with my screen. It's connected in i2c to my Arduino Nano and I'm using a rotary encoder to navigate through a menu. At startup everything is fine, but when I change ...
1 vote
0 answers
153 views

VL6180X returning to its default i2c address after shutdown

According to this thread the VL6180X after changing the i2c address the new address should persist after a power down. but when i changed mine it came back to its default address at 0x29. Here is the ...
1 vote
0 answers
157 views

Arduino Wire library master reader, slave sender example not working

I tried i2c EPROM and that worked pretty fine with arduino master. then i wanted to establish i2c communication between 2 arduinos such that both exchange each other's sensors data. I am not able to ...
-1 votes
1 answer
248 views

variable 'LiquidCrystal_I2C lcd' has initializer but incomplete type

I have a problem with lcd, I have NUCLEO64 L746RG , I have Lcd Display and I2C connected to it. When I verify code it gives me and long error and I can not find the solution or cause of this error: ...
-2 votes
1 answer
49 views

how do I wire a 2nd Adafruit TMP117 board to my Adafruit Metro by I2C?

I want to connect two TMP117 boards to one Metro (ie. Arduino). (the first, addressed at 48 the 2nd at 49.) Should 2nd board's 4 wires simply attach (ie. solder) in parallel to 1st board's 4 wires? (...
3 votes
1 answer
866 views

Raspberry Pi, Teensy and Arduino's on i2c

I just got into an interesting mess. I have 3 Arduino's (Pro Mini's) and 2x Teensy's (3.1's) connected via I2C to a Raspberry Pi Master. The 2x Teensy's I2C data lines are connected via OctoBoards ...
0 votes
3 answers
374 views

Can't read through I2C from RTC

I'm using an ESP32 which I connected to a MAX31329 RTC through I2C. Unfortunately I can't read any register from the RTC. After modifying the MAX31328 library didn't work, I tried reading single ...

1
2 3 4 5
16