Updated GPIO demo
Fix GPIO logic