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
1 answer
46 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 ...
user avatar
  • 9
4 votes
2 answers
48 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 ...
user avatar
1 vote
0 answers
32 views

I2C and logic shifter troubleshooting

I'm attempting to use a SparkFun bidirectional level shifter (Link here) to connect up a 3.3v wii nunchuk to a 5v Arduino Uno circuit. For now all I'm trying to do is write the position of the ...
user avatar
1 vote
2 answers
251 views

Arduino Wire library and Type Cast help

I'm having troubles understanding this line of code that I see with every Arduino EEPROM tutorial. int saveLocation = 4095; Wire.write((int)(saveLocation >> 8)); Question 1: Do the parenthesis ...
user avatar
-3 votes
1 answer
23 views

Changing I2C Address on Garmin LidarLite, resets on reboot

I am trying to change the I2C address of multiple Garmin LidarLite-V3. I am able to change them one at a time using the LidarLite C++ library using the setI2Caddr function, and can see the updated I2C ...
user avatar
1 vote
0 answers
28 views

Audio range with custom waveshape

I am planning to use several Arduino to produce audio range analog signals. I need to use custom waveshapes generated on the fly. As far as I understand, there are two paths: Aquiring a DAC, but can ...
user avatar
1 vote
1 answer
31 views

Servo keeps resetting position when there is no difference in received value?

So I'm working on a code that basically receives x and y coordinates and stores them in a variable. Whenever a coordinate is received, it goes through a conditional statement to store them in a ...
user avatar
1 vote
0 answers
30 views

Flight controller board Reprogram

Recently in my scrap yard visits, more and more I find cheap quad-copters and remote controllers of all kind. I have built up quite a collection of boards and spare parts to create my own army of ...
user avatar
  • 11
1 vote
1 answer
199 views

I2C missing last byte during transmission- solution isn't clear

I am using a Nodemcu-32S to communicate with an I2C device (touchpads). I noticed while uploading the configuration, the CRC (checksum) always comes back incorrect. After doing a little digging with a ...
user avatar
  • 51
0 votes
1 answer
53 views

Erratic behaviour using a DUE with the Microchip 24FC64 EEPROM chip?

I am attempting to read and write from/to an EEPROM chip, and have got access to this 64 kbit device. It appears I can write to the device and read from it, but there appears to be some strangeness ...
user avatar
  • 293
1 vote
0 answers
40 views

Could not find AHT? Check wiring! How do i connect an AM2315C - Encased I2C Temperature/Humidity Sensor to a STM32F103C8T6?

am a little new at this so i sincirely need your help. So I have a temperature & humidity sensor i got from http://www.aosong.com/en/products-70.html which is probably based on the AM2315C - ...
user avatar
2 votes
2 answers
64 views

Trying to understand the bottleneck of sensor sampling rate

Lets say I have a sensor connected to Arduino Uno Rev3's I2C Bus. I am reading the sensor output and using Serial.print() to send the sensor reading back to a my laptop. I am trying to understand the ...
user avatar
1 vote
1 answer
74 views

I2C communication in Arduino

In Arduino I2C we have the following lines of code: wire. beginTransmission(slave addrress) wire.write(the byte want to send) wire. endTransmission() As we know in I2C the master must verifies the ...
user avatar
  • 113
1 vote
0 answers
54 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 ...
user avatar
  • 73
5 votes
0 answers
155 views

Handling non-standard I2C read response lengths with Wire library

I'm trying to read from a Sam&Wing XW12A 12 channel touch sensor IC using I²C. The IC responds to an address read packet with 16 uninterrupted bits representing its state. However, since I²C ...
user avatar
  • 151
0 votes
1 answer
62 views

How many ADS1115 ADCs can I connect to a single Arduino Mega 2560

I know we can connect 4 ADS1115s to an Arduino Mega 2560. Is there any limit on the number of ADS1115s we can connect to the Mega giving each a different address? I have to connect at least 36 ...
user avatar
1 vote
0 answers
139 views

I2C / TWI: set up atmega328p as slave

I try to run an atmega328p as a i2c slave. even with the bare minimum the slave acts as its not wired at all: NACK is transmitted after request (see logic analyzer). The master should read a constant ...
user avatar
  • 21
1 vote
0 answers
90 views

Can a sensor have multiple I2C addresses?

So I'm having a weird issue with a TCA9548A multiplexer. When I run the scanning code given on the adafruit website, I get the following result: TCAScanner ready! TCA Port #0 TCA Port #1 TCA Port #2 ...
user avatar
1 vote
2 answers
59 views

Help needed with I2C LCD + Arduino - DS-LCDD5

I am new to this forum and a relative beginner to Arduino (software wise) Have built many projects, but always just copy/paste/modify example code. I found a couple of these modules (a PIC18 daughter ...
user avatar
  • 31
2 votes
1 answer
126 views

Reverse engineering an i2c signal

I have an i2c device that i would like to rreverse engineer. Using the oringal master of the device here is a snapshot from the logical analyzer I would like to replace the orginal master of the ...
user avatar
  • 193
4 votes
1 answer
214 views

Arduino Uno freezes for unknown reason during code execution

I am struggeling with a behaviour of my Arduino I do not fully understand. Long story short: When starting the communication over I2C the Arduino freezes. In my opinion during the "Wire.write()&...
user avatar
2 votes
1 answer
205 views

Second I2C on Due RTClib, can't start

I am using SDA1, SCL1 for my DS3232 with RTClib on Due. It works on a Mega2560 on SDA, SCL. I ran I2c_test with success after I inserted #define Wire Wire1 However with ds3231.ino this define doesnot ...
user avatar
3 votes
2 answers
232 views

Adafruit MPU-6050 and adafruit I2C Multiplexer

I have 3 adafruit MPUs hooked up to adafruit I2c Multiplexer. All of which is hooked up to a Arduino uno. Attached is also my code. /* Assign a unique ID to this sensor at the same time */ /*...
user avatar
  • 33
0 votes
1 answer
101 views

Problem Using pins A4 and A5 for input and output I2C

Hardare used: Arduino nano ( old Bootloader ) Oled Monochrome Display ( 4 pins, 128 x 32 ) MPU 6050 Both display and MPU use A4 and A5 as I2C communication protocol, They interfere, as the MPU is used ...
user avatar
3 votes
1 answer
61 views

First I2C project - Unable to get any servo movement with PCA9685

I'm working on a project where I need to run multiple servos. For now though, I'm trying to get a single MG90S servo running with a PCA9685 servo driver but I'm unable to get any movement from the ...
user avatar
1 vote
0 answers
85 views

Wire library causing samd21 based board to stop working

A bit of a general question, but asking in case someone has stumbled onto a similar problem before. A friend and I designed a custom PCB board based on the ATSAMD21G microprocessor. The board has a ...
user avatar
1 vote
1 answer
666 views

My PN532 doesn't detect RFID card when connected with ESP32 in I2C mode while it works perectly with Arduino Uno

I have a Elechouse PN532 module (bought here - https://robu.in/product/pn532-nfc-rfid-read-write-module-v3-kit/). When I try to use to it with I2C and connect it to my ESP32 (DOIT ESP32 DEV KIT V1, 30 ...
user avatar
  • 11
1 vote
0 answers
276 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 ...
user avatar
2 votes
1 answer
147 views

How to control multiple servo motors at the same time with protothreading using an I2C PCA9685 PWM board?

I'm trying to use protothreading to control two (and eventually four) servo motors over I2C using a PCA9685 PWM board. To start, I am simply trying to sweep the two motors back and fourth at the same ...
user avatar
  • 31
1 vote
0 answers
48 views

I2C 16x2 LCD - Will Initialize (sometimes) - Holds Up The Code

Basically I have a keypad, that when a certain code is entered, it will write either "Wrong code" or "Good code" on the LCD. At the same time a timer will count down until 0 is ...
user avatar
0 votes
1 answer
63 views

Two-Wire Interface (TWI) Frequency and SMBus Compatibility

Have I understood the ATmega328P datasheet correctly regarding the TWI clock frequency? From §21.5.2 Bit Rate Generator Unit, the TWI clock frequency is calculated as follows: Then solving for TWBR: ...
user avatar
  • 629
1 vote
2 answers
134 views

Writing to a specific I2C register

I am trying to write to a specific register, but value doesn't change. Working with SenseAir Sunrise CO2: Info from i2c guideline from sensor manufacter https://rmtplusstoragesenseair.blob.core....
user avatar
1 vote
1 answer
96 views

AW9523B I2C on Arduino Nano

I'm testing the AW9523B IO expander with an Arduino Nano. I can't get the device to be recognized. Using I2C scanner to find all attached I2C devices. I've connected AW9523B to the correct pins to the ...
user avatar
  • 151
-1 votes
1 answer
83 views

SMBus on ATTiny204 [closed]

So I want to connect multiple LED Panels with dynamic addressing to a Master Controller. Seems like SMBus should be able to do that, however I don't find any Library for the Arduino framework. Does ...
user avatar
2 votes
2 answers
523 views

MPU6050 does not give output

I need help getting my MPU 6050 to actually give me data. As of right now, my program is only reading 0s from the gyroscope and when I move it, the values all go to -1 and the program just stops until ...
user avatar
2 votes
1 answer
58 views

I am in need of a usable communication library on 1-4 pins of ATTiny84 instead of I2C

I messed up when designing my PCB and just assumed that I could use software slave I2C with ATTiny84. The reason I did so is - I needed to use all of the analog inputs. The pins I have on my ...
user avatar
0 votes
1 answer
120 views

Multiple I2C devices connected to one Arduino Uno?

Is it possible to connect more than one I2C device to an Arduino Uno? I know that the SCL and SDA pins are on analog pins A4 and A5 respectively, but there are also two pins labeled SCL and SDA ...
user avatar
1 vote
1 answer
53 views

How to stop Single Analog Pin Keypad Matrix (Using Resistors) from receiving Interference from Livewire/other Sensors?

I saw a tutorial on linking a keypad using one pin, utilising several resistors: http://razibshahdat.blogspot.com/2018/05/one-single-analog-pin-keypad-control.html I have this keypad, a 16x2 LCD, a ...
user avatar
2 votes
1 answer
83 views

Can you use multiple arduinos to run two programs simultaneously?

If I want to run 2 different programs simultaneously, can I do this with 2 arduinos wired together? Context: I’m building a robot that will balance with reaction wheels while doing other tasks. I ...
user avatar
  • 21
1 vote
0 answers
168 views

ESP32 + Attiny85 AC Dimmer

I am working on an AC Dimmer project using ESP32 and Attiny85. Note : I know ATtiny85 is overkill for this project, And it can be done without Attiny85, I have already done this using ESP32 alone. ...
user avatar
0 votes
1 answer
33 views

DS1337 with shared I2C pull-up

I have a project using an ATMEGA328P and a DS1337 RTC chip. The DS1337 is an 8 pin IC with VCC at pin 8 and GND at pin 4. According to the datasheet both pin 5 (SDA) and pin 6 (SCL) need an external ...
user avatar
  • 43
1 vote
1 answer
58 views

Trying to use I2C accelerometer and SPI OLED

I'm trying to stream the data coming from my I2C MMA8452Q accelerometer to an Adafruit-based SSD1351 OLED RGB display that uses SPI via an Arduino UNO. When I run example code for the accelerometer I ...
user avatar
  • 11
1 vote
1 answer
43 views

How to properly send bytes between RPI and Arduino over I2C while using ISR without IOerrors?

I have a I2C connection between an RPI 3B+ and Arduino Nano. I want to send a key and a corresponding value byte, and the arduino does something with that inside a timed ISR. Which works. But I get ...
user avatar
1 vote
1 answer
54 views

How do I read from a correct data address of LIDAR using Arduino in I2C?

I need to read the distance data from a lidar in I2C using an Arduino Nano. Currently, this is the code I've written. unsigned int readDistance() { unsigned int dist = 0 ; // LiDAR actually measured ...
user avatar
0 votes
1 answer
141 views

How to set 16x2 LCD I2C display backlight?

I have 16x2 LCD display with a I2C backpack. This is the library I am using https://drive.google.com/drive/folders/16_UqfwFm4VKWcdeJfDmHRV2Hj_IoaTai?usp=sharing So as given in the code below, by ...
user avatar
  • 452
1 vote
2 answers
168 views

Digispark Rev.3 Kickstarter ATTiny85 using all 6 pins

i have some trouble to use i2c and the other pins at the same time. im tring to control the attiny over i2c with a arduino and the attiny should control a 28byj-48 stepmotor. i started to setup the ...
user avatar
  • 11
1 vote
1 answer
284 views

Arduino with LCD Display does not reset/restart/start on connection to power

A friend and I have been working on an Arduino Sketch that does a request to a local API, parses that data and prints it out on an LCD Display. When we upload the sketch to the Arduino it does exaclty ...
user avatar
  • 13
2 votes
1 answer
351 views

Convert float to byte, from Arduino to Raspberry Pi i2c

I'm trying to send the temperature value from the DHT sensor to a raspberry pi through I2C. Which is the best way to do it?. The temp value is a float, and I think I have to convert it to byte and ...
user avatar
  • 123
1 vote
0 answers
24 views

avrdude: stk500_recv(): programmer is not responding Arduino LCD_I2C Upload problem ( port not found and ...) [duplicate]

i have problem to upload the LCD I2c Example program to Arduino UNo. the code are shown below: //YWROBOT //Compatible with the Arduino IDE 1.0 //Library version:1.1 #include <Wire.h> #include &...
user avatar
0 votes
1 answer
57 views

Read from lux hangs in bright light

I am using VMEL6040 sensors and occasionally under bright light the read can hang, rather than using a wdt to recover I would like to ask some questions about the library. as for debugging the sensors ...
user avatar

1
2 3 4 5
15