Showing different text when the Infrared sensor detected a motion

This is doing a couple things at the same time:

  • Change detection on the sensor
  • Updating the screen

Look into the built-in state change detection example, and consider put the screen updating in the counting part.