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
2k views

need help hooking up an oled display

recently i bought this oled display . http://www.wvshare.com/product/0.96inch-OLED-A.htm how can i connect it with arduino . Driver Chip is SSD1306 . Supported Interface are 3-wire SPI, 4-wire SPI, ...
0
votes
1answer
22 views

I2C comunication, ESP->Nano on endTransmission no ACK fron nano

i am trying to communicate between ESP(master) and arduino nano(slave). This is only a prototype and all works fine. But i want to add multiple arduinos and therefor i need to detect if the arduino ...
0
votes
2answers
30 views

Wire.endTransmission() hangs, but only, if wire.begin(); is called with an address (MKR WiFi 1010)

This code runs without issues, scoped and seen from serial output: #include <Wire.h> void setup() { // put your setup code here, to run once: Serial.begin(115200); Wire.begin(); Wire....
0
votes
1answer
37 views

Scrolling an I2C text

I want tried to make a programm to display a text on an I2C LCD-Display. The text should be scrolled for one position every time the function is called. On the internet I saw a lot of solutions but ...
0
votes
1answer
108 views

Problem to Setting up i2c OLED wemos D1 mini shiled (64*24)

Hi I used this shield before well. But it didn't work when I wanted to work with him last night! this is my wireing : Now I want to know how to test that it is healthy? Is i2c address missing or ...
0
votes
1answer
53 views

Is it permissible to connect 3.3V powered devices to the 5V I2C bus?

I have several devices on the I2C bus: RTC DS3231SN TMP100 temperature sensor EEPROM 24LC256 All devices are powered by 3.3V. The voltage on the I2C bus is 5V. Question: Is the voltage difference ...
0
votes
1answer
36 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
2answers
38 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
1answer
36 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
1answer
181 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
1answer
186 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
201 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
125 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 ...
0
votes
1answer
72 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
156 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
1answer
71 views

I2C master/slave maximum requestEvent message size

Using a NodeMCU master and an Arduino slave (Wire.h on both sides), is there a maximum message size (32 bytes?) for the answer that the slave sends from requestEvent()? If so, is there any solution ...
0
votes
1answer
66 views

Header file or library to test i2c FRAM?

I found a header file to test a i2c eeprom 24LC256, but I used this to test my eeprom CAT24C32.The test sketch works fine. I modified the line BLOCKSIZE 8 because my eeprom have 32byte page write only....
0
votes
1answer
38 views

request for a member “X” in something not a structure or a union

i was programming a Self Balancing Robot, I am writing the code in vscode using platformio extension. when i put the code i need to get the angle out of the gyro in another file (named angle.c) ...
0
votes
1answer
44 views

Wire SlaveReceiver : will the registered function in onRecieve interrupt/conflict with loop block?

I am currently researching on I2C, and I made a configuration that has MasterWriter that transmits data to a SlaveReceiver that will store the data received from Master, into an SD card, and then ...
0
votes
1answer
139 views

i2c slave write to ARM powered device master

I want to communicate to an ARM microprocessor via I2C protocol (Multitech mDot, which uses Mbed platform). I successfully receive data from it (and got it displayed on Arduino's serial monitor), but ...
0
votes
2answers
103 views

Update time in RTC over I2c fails

I am communicating two arduinos using the I2C protocol and sending from the slave to the master the integer value of UTC to update the time in the RTC module. When the master receives the UTC value ...
0
votes
2answers
109 views

Sharing serial output from one to many arduinos (plus a computer) via USB hub

I am trying to send rotary encoder output from an UNO to seven Trinket M0s and a computer via a (powered) USB hub. Currently the UNO → Laptop bit works great, serial monitoring works via the hub ...
0
votes
1answer
54 views

compare char receive from Slave writer to Master reader with I2C

Im trying to send data from slave (writer) to master (reader) then compare it to declared 'char p[]' to turn on the lights but somehow i cant make it work. ////master reader #include <Wire.h&...
0
votes
1answer
510 views

Is it possible to send a float Array over I2c

I have tried it several times myself but i never could send or receive it properly. I am asking myself if it is possible and if so could someone explain how? Cheers.
0
votes
2answers
233 views

HD44780 display incorrectly black-on-blue instead of white-on-blue

I have a generic HD44780 compatible 16x2 LCD display, with an already soldered on PCF8574 module. Its backlight is blue, and the characters are supposed to be white (on blue). It is connected to a ...
0
votes
1answer
175 views

ATTiny85 I2C connection with Arduino Nano

I am trying to send and receive data using I2C between an Arduino Nano and an ATTiny85. The ATTiny is mounted on this board: Link I've tried to reach the slave with the simple I2C scanner, but I don'...
0
votes
1answer
399 views

Weird behavior with char/uint8 arrays

So I'm trying to read an 8-byte character string from an I2C device and print it to the serial console. This raw 8-char array is not terminated when it comes from the device, so I'm pretty sure I need ...
0
votes
1answer
646 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
1k 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
1answer
970 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
83 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
2answers
108 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....
0
votes
2answers
4k 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
1answer
121 views

3.3v Arduino I2C communication with motor controller powered at ~6v

I am trying to just use the voltage from 4 Alkaline AA batteries in series (6v nominal) to power a motor with the TI drv8830 IC. My question is, will this circuit (specifically just pulling the sda ...
0
votes
1answer
661 views

ToF VL53L1X sensor integrate with arduino

I have this latest version VL53L1X time of flight laser distance sensor: http://www.st.com/en/imaging-and-photonics-solutions/vl53l1x.html I study about this sensor, It says that sensor only Access ...
0
votes
2answers
373 views

Can I use 1 clock module for multiple Arduinos?

I want to connect an RTC to a master Arduino, send the time data to a slave Arduino through I2C, then connect an LCD to the slave and print it out. can it be done? A think it would mean that the ...
0
votes
1answer
1k views

Arduino UNO(master read) + NANO(slave write) i2c buttons+stepper

First of all, I'm new to arduino. Check the EDIT line below the two codes. I have connected motor shield to arduino uno. Connection between the two arduinos are A5 to A5, A4 to A4, 5V to 5V and GND ...
0
votes
2answers
741 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
1answer
61 views

IO with port manipulation while not interfering with i2c

I'm using an Attiny84 with the Tiny Core. I'm try to use port manipulation to write the lower four bits of port A. I'm using i2c which occupies bits 5 and 7. How can I write only to the lower 4 bits ...
0
votes
1answer
385 views

If an I2C connection is lost for a short period of time will it work if the connection is live again?

I'm using an ESP8266 with the Arduino library to read from a sensor(MPU9250 specifically). The readings are done via I2C but I'm using a library that abstracts these methods. The wires are not ...
0
votes
2answers
206 views

Getting error 32 in multi-master I2C sketch with library https://github.com/rambo/I2C

I am developing a multi-master scenario sketch with the https://github.com/rambo/I2C library, because this library will handle multi-master data collisions. I created a setup with two Arduino nano's ...
0
votes
1answer
2k views

Why am I getting only around 40% the range of my ADS1115 using an Arduino Uno?

I've connected my ADS1115 to an Arduino Uno as in the diagram (Vdd - 5V, Gnd - Gnd, SDA/SCL - SDA/SCL), all powered from the USB on a PC, with A0-3 unconnected, and am getting readings of around 3000 (...
0
votes
1answer
733 views

Problem to display Ntp time on an oled using U8G2 lib

So I have this code to get ntp time and display it on serial port. But I want to display it on a 1.30 inch I2C oled with a SH1106 controller using the U8G2 library. The only problem is I don't know ...
0
votes
1answer
2k views

Using TFT touchscreen with Arduino Uno R3 via I2C

I've recently gotten into Arduino, due to a friend asking to be part of a project. The project requires a few 24V LED strips to be controllable via PWM, probably over MOSFETs (we have someone else in ...
0
votes
1answer
315 views

SD begin affecting OLED display

Okay, I'm using u8g2 library for my OLED display. After calling SD.begin(4) function, I cannot display anything on my OLED. I'm using U8G2_SH1106_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ ...
0
votes
1answer
193 views

Trouble with Arduino -> PSOC4 communications over I2C! (Multi master/ slave config)

Hello Stack Exchangers! I am currently working on a project which requires me to use PSOC4 - 049's to scan a series of inputs, and feed this data back to an arduino over I2C. The arduino, or in ...
0
votes
1answer
434 views

Multiple I2C devices on Arduino

I'm design a custom PCB based around the Arduino Zero/Adafruit Feather M0. The plan is to use a few I2C devices. I just had a few questions about whether I've designed the board correctly. You'll ...
0
votes
1answer
106 views

Not clear code procedure in Arduino wire library

The application code of sparkFun, has the following line which is difficult to understand. It's requested 6, because it's requesting 6 bytes for HMC5883L module. Wire.requestFrom(address, 6); if(6&...
0
votes
1answer
30 views

Is this a good function for I2C receive?

I'm trying to fix my I2C code: Is the following function correct because it has multiple returns. I don't know if that would work. uint8_t I2C_rx(uint8_t ack_rx) { uint8_t i; if (ack_rx) ...
0
votes
1answer
305 views

Trying to read from AD5934 using Arduino on I2C

I'm trying to read a block of bytes from an AD5934 Impedance converter (PDF) using I2C. This is my code so far Preamble: #define AD5934_Address 0xD #define AD5934_Start_Frequency ...

1
6 7
8
9 10
13