<s> import RPi . GPIO as io <EOL> class GPIOPin ( object ) : <EOL> def __init__ ( self , pin_number , mode = io . BCM , in_out = io . OUT ) : <EOL> """<STR_LIT>""" <EOL> self . pin_number = pin_number <EOL> self . range = ( <NUM_LIT:0> , <NUM_LIT:1> ) <EOL> io . setmode ( mode ) <EOL> io . setup ( pin_number , in_out ) <EOL> io . output ( self . pin_number , io . LOW ) <EOL> def set ( self , value ) : <EOL> """<STR_LIT>""" <EOL> io . output ( self . pin_number , value ) <EOL> def set_normalized ( self , value ) : <EOL> if value >= <NUM_LIT:0.5> : <EOL> self . set ( <NUM_LIT:1> ) <EOL> elif value < <NUM_LIT:0.5> : <EOL> self . set ( <NUM_LIT:0> ) <EOL> def get ( self ) : <EOL> return io . input ( self . pin_number ) <EOL> def get_normalized ( self ) : <EOL> return self . get ( ) </s>
