<s> class BH1750FVI : <EOL> MEASUREMENT_TIME = const ( <NUM_LIT> ) <EOL> def __init__ ( self , i2c , addr = <NUM_LIT> , period = <NUM_LIT> ) : <EOL> self . i2c = i2c <EOL> self . period = period <EOL> self . addr = addr <EOL> self . time = <NUM_LIT:0> <EOL> self . value = <NUM_LIT:0> <EOL> self . i2c . writeto ( addr , <NUM_LIT> ) <EOL> def read ( self ) : <EOL> self . time += self . period <EOL> if self . time >= MEASUREMENT_TIME : <EOL> self . time = <NUM_LIT:0> <EOL> data = self . i2c . readfrom ( self . addr , <NUM_LIT:2> ) <EOL> self . value = ( ( ( data [ <NUM_LIT:0> ] << <NUM_LIT:8> ) + data [ <NUM_LIT:1> ] ) * <NUM_LIT> ) // <NUM_LIT:1000> <EOL> return self . value </s>
