added PinMode myPin = getPinMode(pin);

* Example app tested.
* Coming soon to a firmware near you!