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.
1
vote
1answer
36 views
Problem reading an EEPROM chip using I2C protocol
I am trying to read an EEPROM chip that supports the I2C protocol (cannot tell the IC model number as it is not printed). For sure it supports the I2C protocol, since I wrote a code to detect it using ...
0
votes
0answers
33 views
DS1803 Arduino I2C Wiring
I have hooked up the arduino mega to my DS1803 and have put 4.7K resisters as pull up resisters on the SCL and SDA line. When I use a scanner program (http://playground.arduino.cc/Main/I2cScanner) the ...
0
votes
0answers
27 views
How to read data from arduino with raspberry pi via I2C
I have connected Raspberry pi 2 model B with arduino uno via Bi-Directional Level shifter, from this BLOG
Raspberry pi GND ---------- GND Arduino
3.3v ---------- 5v
...
1
vote
1answer
44 views
How to write a sketch when adding more devices to a I2C data line
I am building a weather station that utilizes a battery operated outside unit that transmits data from a DHT22 sensor to a unit inside my house . The inside unit is using I2C communications from my ...
0
votes
3answers
61 views
Can someone explain how to program i2C communications without using the library?
I am starting to get into i2C, SPI, and other forms of communication. I have read about them and have a fuzzy idea of how they work electrically, but can someone explain how I would turn the ...
1
vote
1answer
16 views
Loop behaves oddly in I2C receiveEvent
I am messing around with an ATmega328P hooked on a Raspberry Pi, communicating over I2C: the ATmega is the slave (details at the end). While testing the basics of the concept, I faced an interesting ...
1
vote
1answer
41 views
Serial Not Working With I2C
I have been working on a hydroponic garden that is controlled with Arduinos. I have everything working except for the user interface. What I would like to do is have an LCD screen paired with a rotary ...
0
votes
1answer
34 views
Regarding using I2C with Arduino for Silicon Micro-structure 5852 D 1.5 psi
I am trying to get output from a sensor (micro-structure 5852D), but I only get two outputs: 11 and 255 for even applying pressure.
The following is my code, please show me how to over come this ...
2
votes
1answer
30 views
Send AND Receive through i2c / set Arduino as master AND slave
For a project I'm using 2 Arduino Uno's, where Arduino#1 (master) sends raw data to Arduino#2 (slave). The slave should receive and encrypt the data and afterwards send the encrypted data back to the ...
1
vote
0answers
12 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
19 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 ...
0
votes
0answers
31 views
Connecting multiple Lidars to Arduino code
Currently, I am trying to connect a total of three Lidars to an Arduino Uno. Right now all I really have to go off is the diagram provided on the link below.
...
0
votes
1answer
26 views
i2c address instead of assigning pins
I found this sketch online and would like to reuse it. I do have a dot-matrix-display, that is accessable through an i2c with the address 0x70. How do I change the code to be able to use the hardware ...
0
votes
1answer
89 views
esp8266-01 and arduino UNO communicating over i2c
i am not able to communicate over i2c with my esp-01 as master and UNO as slave. i get special characters sent back to esp, but my esp is sending correctly...
output on my esp-01
output on my UNO is ...
0
votes
1answer
26 views
scroll text through multiple i2c connected dot matrix displays
I have 4 dot matrix displays, every one of them connected to an i2c and accessible with 0x70, 0x71, 0x72 and 0x73. All these work just fine when I address them apart. What I want to achieve is a ...
2
votes
1answer
29 views
Communication over I2C protocol with more than one A/D device
According to datasheet of MCP3021 A/D converter (Microchip, page 16) the MCP3021 can be accessed by proper address bits in control byte. In case of MCP3021 5AT the address is 101, in case of MCP3021 ...
2
votes
1answer
91 views
Multiple I2C Devices connected parallel
I have two Lidar Lites, connected to one APM. I have no issue with getting data from one of them, i use the code below
#include <I2C.h>
#define LIDARLite_ADDRESS 0x62 // Default ...
0
votes
2answers
177 views
Strange problem. Arduino stops working after few hours. Opinions please
I am trying to setup an automated relay for my aquarium. The Arduino should switch off the pump every 3 hours for 20 minutes, and feed at particular times during the day. The code works fine for the ...
5
votes
2answers
151 views
I2C LCD displaying weird characters
I have connected an LCD with an I2C backpack to my Arduino Uno but it prints the wrong characters. The weird thing is that it worked fine for a while and when I updated the code (but didn't change ...
0
votes
1answer
16 views
Where am I supposed to get an I2C BUFFER_LENGTH defined?
I am using a BLE nano - as soon as I try to include I2Cdev.h and compile, I get this error:
Arduino\libraries\I2Cdev\I2Cdev.cpp:276:62: error: 'BUFFER_LENGTH' was not declared in this scope
How ...
1
vote
0answers
96 views
MPU 9150 connected to Intel Edison (Arduino) slows down after a few seconds
I have MPU 9150 connected to Intel Edison(Arduino).
The program below initializes and gets some data from MPU using I2C. The problem is weird. It starts and works fine for several seconds. After that ...
0
votes
1answer
47 views
TEA5767: Wire.endTransmission() hangs
I'm trying to get a TAE5767 (FM radio) to work. According to this instructable I'm trying it on a 5V-Olimexino 32u4 (Leonardo-compatible) with following code (Arduino 1.6.3):
#include <Wire.h>
...
0
votes
0answers
34 views
Arduino (or Breadboarduino) as I2C slave
I have a somewhat complex setup in which a number of sensors are queried, their results processed and then displayed. For various reasons, I don't want all of this to happen on a single 'duino. So I ...
0
votes
1answer
88 views
Arduino UNO inconsistent I2C register reading from ArduCam
I have an Arducam hooked up to an Arduino UNO. The code I am running looks like this:
#include <Wire.h>
#include <ArduCAM.h>
#include <SPI.h>
#include "memorysaver.h"
const int CS ...
1
vote
1answer
65 views
I2C connection with MT9D111 camera module, strange results after writing registers via i2C
I am currently working on a camera platform based on the MT9D111 module from Micron. The first thing to do is to write the configuration to the numerous registers of the chip which is done via an i2C ...
1
vote
0answers
37 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 ...
0
votes
0answers
100 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 ...
0
votes
1answer
68 views
Configuring IO18, IO19 for I2C connectivity on Intel Edison Kit for Arduino
Intel Edison Kit for Arduino Hardware Guide instructs:
echo 28 > /sys/class/gpio/export
echo 27 > /sys/class/gpio/export
echo 204 > /sys/class/gpio/export
echo 205 > ...
1
vote
1answer
56 views
Modifying Arduino IMU library to rely on DSSCircuit's I2C Master Library
For an Arduino project I am working on, I am trying to modify the SparkFun 6 Degrees of Freedom IMU Digital Combo Board - ITG3200/ADXL345 to support DSSCircuit's I2C Master Library ...
2
votes
4answers
1k views
Weird problem with LCD 16*02 I2C shield
I have an I2C LCD screen provided with a Sunfounder kit and certainly built by DFRobot or such a constructor (there is nothing written on the LCD), and an Arduino Uno R3 copy.
My issue is when I use ...
0
votes
2answers
30 views
I2C between Arduinos without Master
I am working on a library for some Arduinos that should talk between each other.
The aim is that I can load the same binaries onto each Arduino. The I2C ID will be set by DipSwitches.
So far ...
1
vote
2answers
1k views
How to display variables on 0.96" OLED with u8glib library?
I have Arduino Uno and 0.96" I2C Oled 4 Pinned display. These are my Arduino codes:
#include "U8glib.h"
U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); // VDD=5V SCL=A5 SDA=A4
int a = 10;
void ...
1
vote
2answers
64 views
Can I safely integrate 3,3v sensor with 5v Arduino UNO? How?
I plan to use Adafruit's RGB sensor with Arduino working as a RGB controller running on 5V. In my location, the 5V-compatible version of the sensor is not available.
There is a 3,3V pin on my Arduino ...
0
votes
1answer
57 views
LCD Pin Numbering vs I2C Controller Pin Numbering vs Sketch
I've been playing with an Arduino Uno, trying to get a 16x2 LCD screen to work with an I2C controller. I've got this LCD screen and this controller. And I've been trying to get the sketch below to ...
1
vote
0answers
44 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
43 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 ...
0
votes
2answers
53 views
What is the purpose of the howMany integer in the wire.onReceive() function from the example code?
In the master write/ slave read example for the wire library, there is an integer declared howMany that is never used.
void setup() {
Wire.begin(8); // join i2c bus with address #8
...
1
vote
1answer
74 views
Arduino Wire.onReceive(handler)
its says in the description of the function:
Registers a function to be called when a slave device receives a transmission from a master.
So when does it exactly called? i guess its not been called ...
2
votes
1answer
34 views
Arduino Uno and I2C
How does the arduino uno talk with i2c? i saw the circuit and it use analog input pins but as far as i know you cant use them as output. How does he send data over those pins?
0
votes
1answer
119 views
I2C_Anything String / Char Array issues
I've been working with the lovely I2C_Anything.h (thanks to the great work and support from Nick over at http://www.gammon.com.au/forum/?id=10896&reply=9#reply9).. All working great, I was using ...
1
vote
0answers
84 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
2answers
31 views
Is it possible to specify a pin upon which the data sent over i2c can act?
A master will send fan speed values to the slave. The slave will then read the fan speed values and change the speed value for the relevant pwm pin. However I am not sure how I can tell the slave ...
0
votes
2answers
66 views
Switch MPU6050 to send SCL data through A4 and SDA through A5
I have this MPU6050, and like most of the other MPU6050s, it is set up for SCL to be attached to A4 and SDA to be attached to A5. I have this shield on my Arduino Uno, which is configured for ...
1
vote
0answers
23 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 ( ...
0
votes
0answers
24 views
many other address (3)
I'm trying a project with 3 slaves (send data) and 1 master (read data) and I can do it with 1 byte (send data = 255) with all interacting together but with the other sketch with send 2 bytes (send ...
1
vote
1answer
73 views
Connect 2 LSM9DS0 to Flora
So I'd like to connect two of these sensors to an Adafruit Flora (https://www.adafruit.com/products/2020). In the product page it says you can only connect one but in the forum an admin said that you ...
0
votes
3answers
52 views
Arduino wire can't send char
Hi I have problem with school project. I have 3 Arduino - 1 Transmiter with NRF; 2,3 - NRF receiver and wire slave receiver.
I can't send data via "Wire" library (in code char "datar") to receiver ...
0
votes
1answer
92 views
I2C Master send reset command to the slave counter
My name is Gianni, I live in Olbia Sardinia Italy and I have some experience in electronics.
For several years I have been passionate about Arduino.
They are now engaged in a project to counter with ...
1
vote
2answers
2k views
Sending and receiving different types of data via I2C in Arduino
I have found a few good tutorials on how to send and receive data via I2C in connected arduinos. My limitation is now how to transmit different types of data like for instance, long, float, etc. Right ...
0
votes
2answers
101 views
What is an I2C address of a sensor?
I have connected BMP180 sensor
to Arduino and was able to read it's values with appropriate samples (from Adafruit BMP085 Library and Adafruit BMP085 Unified).
Apparently, this sensor is sending ...