You misinterpret how the Wire
library is used. Though the first byte in the transmission is called the address byte, the actual address consists only of the 7 higher bits in that byte. The direction bit is not in the address.
So the Wire.beginTransmission()
method wants the address as parameter, without the direction bit. That bit is set corresponding to the used function (0 for Wire.beginTransmission()
and 1 for Wire.requestFrom()
).
0b0111100
is the real address (when connnecting the address pin to ground)(note, that there are only 7 bits, since the address only has 7 bits). The write operation address byte will then be 0b01111000
, though the library is hiding that way from you. You need to provide the 7 bit address to the function.
the second last bit is a dont care
As mentioned above, that is not correct. This bit (the least significant bit of the address) is set by the address pin SA0. It seems, that you have it tied to ground, which sets the corresponding bit in the address to zero. If you would tie it to Vcc, it would be 1.