sniffing i2c data between master and slave

Hi all,

I have a controller board and a i2c touch controller. The board is allmost dead. I can probably get it running the touch.

Now i want to know if i can still use this touch controller so i hooked it up to my Arduino mini pro and found something on address 127 at 800khz. This might be the controller or the touch controller.

After this is tried the example below but no results.

  • something might be wrong with the code im using like the speed (i dont know how to set this)
  • if this is the touch controller on 127, it might need to be configured at startup, im not getting data by touching it.

I will try to get the board working so i can check for data with my scope.

Any toughts or suggestions?

// Wire Slave Receiver
// by Nicholas Zambetti <>

// Demonstrates use of the Wire library
// Receives data as an I2C/TWI slave device
// Refer to the "Wire Master Writer" example for use with this

// Created 29 March 2006

// This example code is in the public domain.

#include <Wire.h>

void setup() {
  Wire.begin(8);                // join i2c bus with address #8
  Wire.onReceive(receiveEvent); // register event
  Serial.begin(9600);           // start serial for output

void loop() {

// function that executes whenever data is received from master
// this function is registered as an event, see setup()
void receiveEvent(int howMany) {
  while (1 < Wire.available()) { // loop through all but the last
    char c =; // receive byte as a character
    Serial.print(c);         // print the character
  int x =;    // receive byte as an integer
  Serial.println(x);         // print the integer

An I2C slave pulls the bus low to let the master know that it got the transmission. Two slaves on the same address will conflict. They will pull the bus low at slightly different times and the slow one is going to be left behind.

A Bus Pirate or a logic analyzer with the I2C option would be better to capture the bus traffic.