beaglebone: added isValid(pin)