Created libraries to handle the rotary encoders

The is still an issue with wsing a glabal variable. When multiple
instances of a rotaryEncoder are created, one is ignored because of the
global variable. Need help to fix.