add GPIO Example with global variable