Datasheet

To read one or more registers, issue a write command and transmit the register address
that should be read from, followed by a stop command. Then issue a read command, the
data read will be the value that is stored in that register. Issuing another read command
will automatically read the value in the next register. This can go on until all registers have
been read. After reading the last register, additional read commands will return 0xFF.
Issuing a stop command will terminate the read event.
Reading register values
Example
Start reading at register 0x04 and read 2 times.
0x04
0x04
0x05
Read
Stop
Write
Start Stop
0x04
Address
Read
Start
Address
byte i2c_device_address=0x64;
byte reg_4, reg_5;
Wire.beginTransmission(i2c_device_address);
Wire.write(0x04);
Wire.endTransmission();
Wire.requestFrom(i2c_device_address,2);
reg_4=Wire.read();
reg_5=Wire.read();
Wire.endTransmission();
Example code
reading two registers
The default device address is 0x64
This address can be changed.
8
Copyright © Atlas Scientific LLC