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.

94 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
215 views

How to use SPI to set/ read registers for a sensor (Avoiding need for Github Lib)

Ok so as some readers might have seen, my current project involves using MPU's. The idea is sending data via CAN bus to a controlling MCU to then send to a raspberry pi to perform the calculations ...
2
votes
1answer
4k views

I2C libraries for ATTiny85?

I want to transmit I2C data, using a Digispark ATTiny85 board: http://digistump.com/products/1 http://digistump.com/wiki/digispark/tutorials/connecting I've found the following I2C libraries. Which ...
2
votes
2answers
281 views

AtTiny85 and MMA8452Q accelerometer cannot connect using i2c

I am trying to connect the MMA8452Q with AtTiny85 using the TinyWireM library. I made the proper hardware setup with pull-ups on SCL and SDA pins - tested it on Arduino Uno and it works, however ...
2
votes
0answers
3k views

Why is Wire.onReceive() called during requests?

I'm building a complex I2C-based networking protocol and have noticed that the Wire.onReceive() handler is called both for I2C read and write operations. When the master writes to the slave, it is ...
2
votes
1answer
115 views

Accelerometer (I2C) and Fona Shield (software serial) won't work together

I am using a Fona 808 shield with an Arduino Uno and the LSM303 accelerometer. The accelerometer is connected via I2C and the Fona uses software serial. My project requires the accelerometer to be ...
2
votes
0answers
423 views

Connecting arduino and EV3 using I2C

I'm trying to connect arduino uno and ev3 by using this guide (http://www.dexterindustries.com/howto/connecting-ev3-arduino/), everything works perfectly but when i tried to use analogRead block to ...
2
votes
0answers
620 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 ...
2
votes
0answers
118 views

How can I send a number from a master and make the slave read it?

I am building a fan controller using an Arduino and a Raspberry Pi (the Pi is the master and the Arduino is the slave). The Raspberry Pi generates random numbers and I want the slave (Arduino) to be ...
1
vote
0answers
25 views

Can't get MMC3416xPJ to work

I needed a magnetometer with a high Output Data Rate (ODR). This is because I wanted to measure AC magnetic fields of around 20-80 Hz. So I decided to go with the MMC3416xPJ prototyping board which ...
1
vote
1answer
54 views

conflict with different i2c devices

I am trying to communicate with two i2c components using an arduino nano - some ADS1115s and some i2c flow sensors each connected to a different i2c multiplexer, but they seem to be conflicting. ...
1
vote
0answers
101 views

Is it possible to use I2C and SPI ons the same Clock line?

I'm trying to connect an I2C OLED display and an n RF24L01 WiFi module to an ATTiny85. But I only need 1 extra pin. Is it possible to use the same clock wire/pin for the I2C and SPI device? Maybe with ...
1
vote
0answers
42 views

STM32F103C8 - Arduino Mega FAST MODE(400000L) I2C communcation not working

I'm trying to connect a stm32F103C8 board (master) to an Arduino Mega (slave) over I2C. I have a master and slave program which runs perfectly fine when the clock frequency for I2C communication is ...
1
vote
1answer
294 views

Looking for light-weight Arduino OLED library that supports text and bitmaps

I'm trying to incorporate a screen into my Arduino code which is quite large already. The Adafruit SSD1306 library is overly large and has a lot of unnecessary things in it. I've found the ...
1
vote
0answers
287 views

How to read the busy flag on LCD?

I have a standard 16x2 LCD screen and I have it hooked up to my Arduino UNO via a I2C backpack (4-bit mode). Since I want to learn about the lcd at a lower level I’ve decided not to use the LCD ...
1
vote
0answers
382 views

I2C on ATtiny85 and Si4703 radio

I've got an Si4703 breakout from Sparkfun, which communicates via I2C. I have gotten it to work very easily using a regular 3.3V Arduino Pro Mini, but am now trying to move everything over to an ...
1
vote
2answers
631 views

I2C broadcast and reply on Arduino M0+

I am trying to set up several ATSAM-based AVR chips in a master/slave broadcasting arrangement. I want the master to be able to send a broadcast message to I2C address 0, and then for slaves to ...
1
vote
0answers
344 views

Connection between Arduino Mega 2560 , ESP8266-12F , PCF8574

Another start for achieving something new , I want to connect ESP8266-12F , Arduino Mega 2560 Board And the PCF8574 I/O Expander (I can use MCP23017 also) together , Where ESP8266-12F will take ...
1
vote
0answers
849 views

How to prevent Wire.requestFrom from hanging?

I'm trying to read data from an Arduino Uno I2C slave via Wire.requestFrom() on an Arduino Uno master. The slave's onRequest handler is simply: void I2C_Send() { byte myArray[4]; myArray[0] = ...
1
vote
3answers
2k views

Multiple VL6180X distance sensors interactive problem

I am trying to use a VL6180X distance sensor and an Arduino Uno board for individual sensor doing individual distance sensing. This sensor follows the I2C protocol. Since for the same type of sensor, ...
1
vote
0answers
41 views

Why am I only receiving the first address byte? (I2C Protocol)

Expecting the slave to ACKnowledge and return data, but it does not. This is my protocol. This is my Datasheet. Also FYI I'm on an Arduino Fio but I am not inheriting the Arduino library. #include &...
1
vote
0answers
236 views

Adafruit Trinket 3v with LED matrix backpack producing error

I have been wanting to create a Arduino watch. I built the circuit with an Adafruit Trinket 3v and an Adafruit LED matrix backpack (8*8). When I try to upload this example code: /*********************...
1
vote
0answers
130 views

Reprogramming a specific slave from the master ATTiny 85 (connected to IDE)?

Given that every ATTiny connected already has a bootloader (micronucleus) installed, here's my theoretical chain: Computer > Master ATTiny (Connected via USB) > ATTiny Slave A > ATTiny Slave B Is it ...
1
vote
0answers
175 views

Too many Bytes Using Ultrasonic Sensors

I need to send one transmission and record multiple distances with 4 receivers, but everytime I use more than 2 receivers, the serial data does not print. What can I do? P.S. I'm using 5 SRF-02 ...
1
vote
0answers
551 views

ATtiny85 + HC-05 + Oled = smart watch

I am using an ATtiny85 for making a smart watch. Bluetooth module HC-05 with ATtiny85 pins PB3->TX, PB4->RX and it works. Secondly I have connected a 0.96" OLED on PB0 (SDA) and PB2 (SCL) and this is ...
1
vote
0answers
486 views

I2C — set int pin

I am using a blend micro board, where the digital pins 4, 6 and 7 are reserved. I have connected a MPU6050 which uses the I2C protocol, so there is the need for the i2cdev lib to handle that. The ...
1
vote
0answers
98 views

Teensy and MS5803 sensor

I'm trying to use the MS5803 pressure sensor with a Teensy 3.2. Compiling the Sparkfun, or other, libraries, however, results in no output. Can you provide guidance on how to modify the libraries to ...
1
vote
0answers
110 views

Basic communication between Cotek and Arduino UNO

so I am trying to get a reading from my Cotek through my arduino and have it display on an LCD screen. When I run the code, though, nothing shows up. I am EXTREMELY new to using pretty much all this ...
1
vote
0answers
135 views

I2C with an arduino, a PI and an IO expander

im working on a project which requires alo i/o pins. For that reason i bought a pcf8574P 8bit I/O expander which uses the I2C protocol. The problem is how to combine the Rasp PI and the arduino. For ...
1
vote
0answers
308 views

Receiving multiple bytes from an RPi using the i2c protocol

Trying to send bytes from an RPi as a master to an arduino as a slave. The send uses the write_byte(addr, value) function and seems to be working perfectly. The arduino however has issues with ...
1
vote
0answers
941 views

Unexpected Timer Conflicts (Uno)

I've been working on a project (Arduino Uno: Atmega328) that implements a gyroscope (which is used with the LSM9DS0 spark-fun library) that is communicated with through I2C and uses a Servo library. ...
1
vote
0answers
941 views

How do I use I2C from an Arduino Uno when I have a GSM shield mounted?

This may be an extremely obvious question but I don't seem able to find a definitive answer. I have an Arduino Uno and a Sim900 GPRS/GSM shield fitted on top of it. I had I2C working on the Arduino ...
1
vote
0answers
170 views

i2C and lost connections with IO errors

Having issues troubleshooting IO errors using i2C . Running a Python script on a raspberry Pi as master talking to an Arduino slave. The problem is that when making any change in my code that results ...
1
vote
0answers
196 views

GPS - Speed doesn't update as should - EM408 & Arduino Mega & GSM

I'm developing a system that will get the GPS signal and send it though the GSM with information about position, speed and temperature from some digital sensors. Currently I'm using the GPS EM408, ...
1
vote
1answer
550 views

Getting inverse values of acceleration and tilt for the MPU 6050

I'm using the I2C library to connect to a GY-521 board and, when executing the getAcceleration() methods I get gyro values and viceversa.. This is my setup (I'm using a proto shield but that shouldn'...
1
vote
1answer
541 views

Arduino Pro Mini I2C Problem

I am trying to connect a distance sensor VL6180x to Arduino Pro Mini via I2C. Yesterday it was working without any problems, but today it refuses to work, even though I haven't changed anything. The ...
0
votes
1answer
13 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
47 views

i2c Connection for MCP4725(Dac) with Esp8266 wemos d1 mini

------------ This question has been edited ------------ note: Dac and Adc is12bits my problem : I use two ESP. Using esp1, I read the Adc amount of the alternating signal (ECG) and send it to esp2 ...
0
votes
0answers
19 views

NFC wont send URL to mobile phone

I'm using nfc 2 click (NT3H2111), I tried via arduino to send data to my mobile phone using this code : #include <Wire.h> int i = 0; int j = 0; uint8_t NDEF_DATA[] = { 0x03, // NDEF Message ...
0
votes
0answers
28 views

Servo PWM Pin seems to be interfering with Wire.onRequest i2C function

A newbie here. I am thinking of interfacing Raspberry Pi with Arduino via I2c to control a few servo motor (as RPi have limited PWM pins). Meaning I would send input from RPi to Arduino to allow to ...
0
votes
1answer
14 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
0answers
15 views

Arduino Setup for RF Transmit and Receive, IR Receive, WS2812 LEDs and a Piezo Speaker

I am new to Arduino and microcontroller in general and just finished one Project (TonUINO - a DIY music box for kids). Now I am planing and working on my next project. A IR shooting range. The guns ...
0
votes
0answers
40 views

Calculate pullup resistor, cat5e ftp

let me describe my schema, i got one arduino and one esp32 connected over i2c using 30m cat 5e ftp cable, I'm using 12v to power up both devices, each of them have dc-dc converter that convert to 5V, ...
0
votes
0answers
28 views

Arduino 3.5" TFT Display going blank after sending data through I2C

I'm trying to use I2C to send and receive commands between an Arduino UNO R3 and an Arduino Mega R3, with a 3.5" TFT display connected to the Mega. I have verified that my display is fully functional ...
0
votes
1answer
22 views

Trouble with i2c on ESP8266

I have used with partial success I2C with the ESP8266. When it works, it works well, with many devices on the bus. I've examined the signals on a 'scope to assure Vlo, Vhi, Tr, and Tf. However, ...
0
votes
0answers
35 views

I2C between two arduinos

I have 4 gyro sensors that communicate to arduino uno using I2C and then arduino uno sends the data to arduino mega. I was wondering if I could use i2c for this purpose or if I should look for other ...
0
votes
0answers
44 views

Lost with Nano and i2c

I've been struggling with some code that was failing to "begin()" any devices on my i2c bus. I've uploaded a scanner program from arduino playground which lists the addresses of any i2c modules found. ...
0
votes
0answers
63 views

i2c code hanging - tried all connections

I'm trying to connect a TCA9548a breakout to my nano (also tried using an uno), but it can't recognise it - using the i2c scanner it just hangs on 'scanning...' I've tried everything suggested in ...
0
votes
0answers
35 views

Arduino IDE + Metro + I2C device (Grideye) + Code for Uno = weird results?

I have been working successfully with the arduino uno and a thermal camera device called grid eye. There is a board available at the popular suppliers of arduino addons. For the uno, the code looks ...
0
votes
1answer
33 views

Arduino help adding a second mpu 6050 sensor my working code

Background information: I currently have this arduino code that uses one mpu 6050 sensor to get angles in the x, y, and z directions and then display them to the user nicely. Code can be found here ...
0
votes
0answers
37 views

Having trouble reading directly from VEML6075 UV sensor from its registers(I2C)

I'm kinda new to Arduino and decided to dive deeper into learning abit more about Arduino; So i decided to grab a Sparkfun VEML6075 UV sensor and try to: 1) Initialise it 2) Take readings from it ...