I appreciate everyone's responses !!
I have modified the code as follows and getting nothing on the Serial Monitor..
#include "Wire.h"
#define addrs 0x78 // I2C bus address
void setup()
{
Wire.begin();
Serial.begin(9600);
}
void loop()
{
byte firstbyte;
byte secbyte;
Wire.beginTransmission(addrs);
Wire.write(1); // move your register pointer back to 0
Wire.endTransmission();
Wire.requestFrom(addrs, 2); // contents of your first two registers
while (Wire.available() < 2)
{}
firstbyte = Wire.read(); // Read press high byte
secbyte = Wire.read(); // Read press low byte
Serial.print("first byte ");
Serial.print(firstbyte, BIN);
Serial.print(" sec byte ");
Serial.println(secbyte, BIN);
delay(500);
}
If i change the while loop to the following below, i get this on the serial monitor " first byte 11111111 sec byte 11111111", which still isn't right ?
Wire.requestFrom(addrs, 2); // contents of your first two registers
while (Wire.available() )
{}
firstbyte = Wire.read(); // Read press high byte
secbyte = Wire.read(); // Read press low byte
I appreciate the help guys a lot..
Pete