It is true that if you ask the processor to do more than it is capable of doing then your code will fail, possibly in weird and unexpected ways. However, that is not what the term blocking code is generally understood to mean. I've given you my definition, perhaps someone else here has a better or easier to understand definition or description.
Some useful tutorials:
Once you have mastered the basic blinking leds, simple sensors and buzzing motors, it’s time to move on to bigger and better projects. That usually involves combining bits and pieces of simpler ske...
Introduction
A common question is to ask how to flash 2 (or more) LEDs at the same time. Typically the person asking will be using delay and will be experiencing the main problem with delay: it blocks and stops anything else from happening.
The code below flashes 2 LEDs, one connected to pin 2 and one to Pin 3, each with a suitable resistor (220 Ohms or thereabouts) to 0V. Each LED flashes independently of the other.
Notes
I have used separate functions called from the loop function to illus…
Part 1
It is not usually long before new Arduino users discover that although the delay() function is easy to use it has side effects, the main one of which is that its stops all activity on the Arduino until the delay is finished (not quite true, I know, but that is usually how the problem presents itself). When this occurs the new user is usually directed to the BlinkWithoutDelay example sketch
(BWoD) and/or the excellent thread entitled Several things at the same time. Several things at the…
NOTE for newcomers. The demo is entirely contained in this Post and Reply #1. There is no need to read further unless you are interested. ...added 25Sep2014
There have been a few occasions recently where newcomers seemed to have difficulty applying the "blink without delay" and "state" concepts to a sketch that is intended to manage a number of concurrent actions.
Its very time consuming to respond with suitable code examples - particularly as every case is a little different.
I have prepared…
That's just a sample, there are lots more.