Added readmode option.
Option will return the mode the selected pin is in.