I2C reader

Is it possible to make arduino to connect to a i2c system and read everything thats going threw it?

If yes what is the simple code for this?

If not, what is required for this to work?

In any data analysis system, a requirement is that the monitoring system can analyse (or at least accurately collect) the data faster than the system generating it.

I would suggest using an ESP8266.

Paul__B: In any data analysis system, a requirement is that the monitoring system can analyse (or at least accurately collect) the data faster than the system generating it.

I would suggest using an ESP8266.

I would like to connect directly into a alredy running system by using the scl and sda pins. By connecting these into the system will I be able to read anything?

What will the esp8266 be needed for?

Is it possible to make arduino to connect to a i2c system and read everything thats going threw it? Yes If yes what is the simple code for this? It is not at all simple

Won't there be some complication due to the master /slave nature of I2C? The existing "system" (whatever that means) would presumably have a master, perhaps reading some slave sensors. The Arduino would also want to be a master to read those sensors, would it not?

I wonder how that would be sorted out.

It is not hard to capture and display the bus states and transitions: google "Arduino I2C sniffer". Interpreting them is more challenging.

jremington: It is not hard to capture and display the bus states and transitions: google "Arduino I2C sniffer". Interpreting them is more challenging.

Well its something like that im looking for. But what do you mean by interpreting?

interpreting = "understanding exactly what each of the bus states and transitions mean and what data are being exchanged"

in other words, "read everything thats going threw it"

I don't understand what can cause problems with an I2C reader (slave). It can read all transmissions, starting with an address byte (maybe more), and interpret the following bytes as data from master or slave, depending on the r/w bit. Listening may have to be forced, as the hardware and library implements the standard slave protocol. As I understand the controller data sheet all I2C state changes cause a TWINT flag or interrupt, where the actual state can be determined.

gahbah: What will the esp8266 be needed for?

The ESP is much faster than an Arduino (ATmega328), so it can be used to capture the transaction sequences on the I2C lines by connecting in parallel (with appropriate voltage protection).

But you have to find software to do it. - or write your own

jremington: interpreting = "understanding exactly what each of the bus states and transitions mean and what data are being exchanged"

in other words, "read everything thats going threw it"

What do I need, to go further in order to interpreting correctly?

Have you learned this material? I2C protocol

Hi, What is the application?

Tom... :)

jremington: Have you learned this material? I2C protocol

As I understand it I can read from the I2C lines even thou I have no adress. I need a level shifter in order to connect to the lines.

And to communicate with these lines I need the esp8266.

or am I wrong?

  1. Yes
  2. No
  3. No
  4. Yes

jremington: 1. Yes 2. No 3. No 4. Yes

The level shifter is used if there is voltage differences

And a better way to communicate with these lines is to use the esp8266

Is it the code that I need that is hard to write?