In a basic Arduino sketch, if you want to take action based on the
status of a digital input pin, you’d check the state of the pin
repeatedly until a particular condition is met. However, as your
sketches become increasingly complex, you’ll find that it’s not always
the best way to do this. EngBlaze posted a pair of guides
to using interrupts so that you can execute code asynchronously in
Arduino sketch. Here’s the analogy they use to illustrate the
difference:
No comments:
Post a Comment