Get me outta here!
The break out block serves to interrupt the execution of a loop. Imagine that you want a loop to carry out an action 100 times, for example, turning an LED on and off while the buzzer sounds. However, you want it to stop flashing on and off or buzzing when the button is pressed (because all that noise and blinking is tiring). So how do we go about doing this? With the break out and continue blocks. When you use this block within a loop, you automatically leave it (break out), or you skip to the next iteration without finishing off what´s inside the block (continue). Let´s have a look!
Today you will need:
- 1 x ZumBloq LED
- 1 x ZumBloq push-button
- 1 x ZumBloq buzzer
- A ZUM BT 328 controller board or one compatible with Arduino UNO
- A USB cable
Have a go yourself and you´ll see how it works.