Gpio objects should be declared as global to keep its lifetime