As simple as it may seem, knowing when something is either on or off can be a great tool to designing something useful. Answers to the following questions are what this lesson plans to tackle:
Is a button being pressed?
Has a switch been turned on?
What is my on/off sensor status?
When you can answer questions like these, you can implement actions based on the current status – if the button is pressed do this – otherwise, do that. If the sensor is HIGH take this action, otherwise do nothing. You get the gist. But before we can implement the actions, we have to be able to track the status and the changes of the digital pins.