Software commands hardware. Can hardware command software? Yes! It can and it should, from time to time. When the two cooperate, it's more like a dance and less like a military exercise. Let's look at some ways to make your software more aware of the available hardware, and what benefits you can derive from this more-cooperative relationship.
The first step is to learn more about the peripheral hardware that is already built in to your Arduino and how to use it in your applications. Next you move on to using interrupts more effectively, which can make your Arduino look like it can do more than one thing at a time.