#NEWLINE# def readSensor( self , sensor ) : #NEWLINE# #INDENT# bus . write_byte ( HP20X_I2C_DEV_ID , HP20X_ADC_CVT ) #NEWLINE# time . sleep ( 0.25 ) #NEWLINE# bus . write_byte ( HP20X_I2C_DEV_ID , sensor ) #NEWLINE# data = bus . read_i2c_block_data ( HP20X_I2C_DEV_ID , 0 ) #NEWLINE# value = ( ( ( data [ 0 ] << 16 ) | ( data [ 1 ] << 8 ) ) | data [ 2 ] ) #NEWLINE# return value