Hi,
I was wondering if there was a distinct command to set the register pointer besides Wire.write (or Wire.send). For example, if in the setup function of my code I want to set the (initial) value of register 0x01 to 00011001b, I would add the following code to my setup function:
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.send(0x01);
Wire.send(B00011001);
Wire.endTransmission();
So my question is, what if I want to set the value for register 0x02 as well? Would I have to call another Wire.beginTransmission(), set the pointer to 0x02 and then do a Wire.send(), or can I just add Wire.send(BXXXXXXXX) in the code above like so:
Wire.beginTransmission(CLOCK_ADDRESS);
Wire.send(0x01);
Wire.send(B00011001);
Wire.send(BXXXXXXXX);
Wire.endTransmission();
Would this work because I am writing to consecutive registers? What if I wanted to skip 0x02 and only write to 0x01 and 0x03?
Thanks