Change State

Turn pin on or off depending on input