How to eliminate Wait and While?

How to eliminate Wait and While?

Two simple approaches:

  1. use interrupts: you can think of interrupts as a simple way to prioritize tasks;
  2. use cycle counters: it is essentially a state machine approach;

Do I use a lot of interrupts?

I use interrupts extensively - they make coding so much simpler.