what makes the pins change state ?