Fixed reset function and if statement mismatch in button()

Reset will now set the global variable to 0 instead of clearing the ports