debugged gpio control