Changed gpio from input to input pullup.