code/examples/06-i2c/mpu6050.py
def read_i2c_word(self, register):
        """
        Read two bytes and return an integer
        """
        # Read the data from the registers
        # MSB (15-8) are read first followed by LSB (7-0) (see mpu6050 Register Map)
        raw_bytes = self.i2c.readfrom_mem(self.address, register, 2)
        return ustruct.unpack('>h', raw_bytes)[0]

        Read two bytes and return an integer
        
Read two bytes and return an integer
Read two bytes and return an integer
def read_i2c_word(self, register):
        raw_bytes = self.i2c.readfrom_mem(self.address, register, 2)
        return ustruct.unpack('>h', raw_bytes)[0]
def read_i2c_word ( self , register ) : raw_bytes = self . i2c . readfrom_mem ( self . address , register , 2 ) return ustruct . unpack ( '>h' , raw_bytes ) [ 0 ]
Read two bytes and return an integer
Read two bytes and return an integer
"""
        Read two bytes and return an integer
        """ # Read the data from the registers # MSB (15-8) are read first followed by LSB (7-0) (see mpu6050 Register Map)
self
register