Added encoder

Added L and R encoder code.