PAUSE IN THE CODE: DELAY
Sometimes it is necessary to make the program stop for some time before performing another action. For example, when we want to blink an LED for some time then turn it off, we use the block " delay " that we find in the section "Control ".

This block causes the program to stop for the amount of time you specify in " milliseconds " or " microseconds. " For example, the following code will flash the LEDs "color blue ", what we want is that 1 second to stay on and turn off another second:

Remember in brikoblocks instructions are sequential, so our program: 1. Turn the LEDs to blue. 2. Goes to "function delay " for a second i3. Turn off the LEDs. 4. Another is expected second. Once you have completed the last block, the BK7 restarts the program from the first block again.

Example 1: Patrol
Using delays LEDs will blink as a police patrol and each state will change every 250 milliseconds:

Our code block is as follows:


