button held state fixed / updated buttonStates example

the "held" function becomes true only after 500 milliseconds. In this
way it's easier to differentiate it from "pressed". Updated the
"ButtonStates" example.