yes, now it seems working but not sure about that "I am fetching correct data"!!
What I was missing was that endtransmission in between. Also, request from is necessary...only read() don't work... As you state no need for configuration in setup...
It is difficult to understand I2C in terms of functions better could be the timing diagram of each function!!
@pylon : it is because I thought it is 7 bit addressing mode library which means after shifting one bit to right it becomes 00111011 which is 59!!
it is because I thought it is 7 bit addressing mode library which means after shifting one bit to right it becomes 00111011 which is 59!!
I2C addresses are always 7bit (by the standard). Seldom you see datasheets where they show the first byte of the communication as the "address" but the usually explain that they provide the complete first byte and they either write about a read and a write address or the provide a byte where the lowest bit is not set.
What I was missing was that endtransmission in between.
In the Wire library a Wire.beginTransmission() starts a new write request but nothing is sent until you call the Wire.endTransmission(). A Wire.requestFrom() starts a read request, the method doesn't return until all the requested bytes are completely read into the internal buffer.
I2C is 8 bit address in this case as 0x77 is eight-bit. you can also see in the code.
No, I2C is always using a 7bit address. As I explained, only some exotic datasheets provide the first byte instead of the I2C address. If you read I2C address in a datasheet it's always the 7bit address, so you don't have to shift anything.