Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

2
votes
0answers
125 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
0answers
2k 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
0answers
411 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
601 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 ...
1
vote
0answers
48 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
27 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
0answers
270 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
345 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
0answers
329 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
455 views

I2C wire.h send 2 variables

I am trying to send 2 variables with wire.h. I tried with this code: MASTER RECEIVER: #include <Wire.h> // include la libreria #include <LiquidCrystal_I2C.h> #include "RTClib.h" ...
1
vote
0answers
751 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
0answers
39 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
232 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
128 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
171 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
537 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
442 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
96 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
104 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 raspberry pi is the master and the arduino is the slave). The raspberry Pi generates random numbers and I want the slave ( ...
1
vote
0answers
106 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
134 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
302 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
916 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
925 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
168 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
195 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, ...
0
votes
0answers
41 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
49 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
29 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
0answers
24 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 ...
0
votes
0answers
28 views

LCD not displaying any character with I2C or when used separately

I have an arduino uno and pin connection for I2C are - SDA --> A4 SCL --> A5 VCC --> 5v GND --> GND This the code i am uploading taken from the examples - #include <Wire.h> #...
0
votes
0answers
44 views

How to interface Arduino with NXP PCA8561 LCD segment driver?

I've just bought few NXP PCA8561AHN LCD segment drivers to do some tests which unfortunately did not went as expected. I'm familiar with expanders and segment LED displays but LCDs seem to be way ...
0
votes
0answers
40 views

SerializeJson not working when using softserial

IDE:1.8.8 Board:Arduino UNO When I use the code below, I get result of print like this. { "result": [ { "ID": "01", "Value": [ "2", "1", "13" ] } ] } But when I use SoftwareSerial and in the setup ...
0
votes
0answers
37 views

What is the difference between the digital temperature sensors SHT31 and DHT11 or DHT12?

I am looking for a digital temperature sensor with I2C interface. I found the SHT31 and the DHT12 (compatible to DHT11). Both also include humidity sensors. And I found libraries for both of them. ...
0
votes
0answers
38 views

Problem I²C Communication between Arduinos

My Problem seems to be that my I²C slave randomly disconnects. I have an Arduino Due communicating with a Arduino Chestnut board (bought hardware). I now measure data with the Due and then send the ...
0
votes
0answers
40 views

Buffer to string

I'm a bit of a noob, so excuse if this is more obvious to me than to you. I want to convert a u16 to a string. The u16 is the data coming in from the sensor. I need it as a string, or anything else ...
0
votes
0answers
40 views

Bit Bang I2C with port manipulation on AtTiny84: new pinout doesn't work

So I am trying to understand bit banging and port operations. I'm developing a breakout board with an ADXL343 IMU read by an AtTiny44 via i2c. I adapted this code from MIT's How To Make Almost ...
0
votes
0answers
36 views

LCD displays weird characters

I have connected the LCD by the 3 wire method using the LiquidCrystal595 library+74HC595 register shift; sometimes "hello world" is displayed but other times the LCD displays weird characters. How to ...
0
votes
0answers
137 views

Arduino pulse oximeter max30100 didn't work

I have a school project that help babies who has a heart problem, I'm using an Arduino UNO R3, HC-05 Bluetooth and pulse Oximeter MAX40100(RCWL-0530), and I'm using the library at https://github.com/...
0
votes
0answers
50 views

Using TCA9548A to read 30 ADCs

I want to read 30 differential ended analog sensors. Using ADS1115 16 bit this is possible, but we end up having only 4 address on I2C, so i chose TCA9548A breakout board with 8 I2C multiplex channels,...
0
votes
0answers
166 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
0answers
54 views

LCD (I2C) issues with pull up resistor

I'm close to finish my first DYI project. But a never seen issue on the breadboard has apprear as soon as assembled. The LCD is always / totally blank/black. When I remove the 4.7 K ohm pull-up ...
0
votes
0answers
36 views

Why is Wire.endTransmission(true) returning 10?

Question: The follow code is printing 10 over and over again (with spaces in between). I have an I2C device connected at 0x60, and nothing connected at 0x61. I'm confused by this because the Wire....
0
votes
0answers
40 views

Teensy freezing when reading ir sensor

I have a teensy that controls a motor and reads from a ir sensor, GP2Y0E02b. The issue i run into is that at random times the teensy seems to freeze, the main code stops printing but the interrupt ...
0
votes
0answers
81 views

Arduno as bridge between two i2c masters

so I am gonna just jump right into the topic. Recently, I have been trying to build a project where I need to connect an ev3 to a raspberry pi. I have decided doing it by i2c after reading (and ...
0
votes
0answers
581 views

Can't get I2C + SPI working on Wemos D1 Mini Pro

I've been struggeling allday to get I²C and SPI working on the same time on my Wemos D1 Mini Pro, i want to use a BME280 + the Wemos D1 Mini 1,4' TFT Shield. If i comment one or the other out, the ...
0
votes
0answers
155 views

how to send FFT array consist of 512 Samples Data From arduino to raspberry pi using i2c and this is the code for FFT any Suggestion plz?

#include "arduinoFFT.h" float y, x = 0; #define t PE_0 #define SAMPLES 1024 //Must be a power of 2 #define SAMPLING_FREQUENCY 1024 //Hz, must be less than 10000 due to ADC arduinoFFT FFT = ...
0
votes
0answers
4k views

NodeMCU (ESP8266) with SPI TFT, I2C RTC, & 2 Buttons, correct GPIO to use?

From all my research it seems that the NodeMCU only has 11 available GPIO (6-11 are used to connect flash memory chip), i'm wondering if anybody can help me with these final connections I have left ...
0
votes
0answers
129 views

Using 4 identical sensors on the I2C bus

I am using 4 Pololu VL6180X ToF sensors on the Arduino UNO for a school project but just can't seem to get it working correctly. I understand that I need to hold them in reset and change the I2C ...
0
votes
0answers
360 views

trouble running i2c and spi at the same time

I know this question has been asked before but I am having trouble running I2c and SPI at the same time. I am attaching my code below. The problem when I run the code is that the LED's don't blink ...