refactored GPIO:GPIO constructor