Arduino programs (sketches) can be written in thousands of different ways. The best Arduino program control will be determined by the purpose of your program and what you are trying to accomplish. To simplify the logic we will be looking at program control that can be achieved using productivity blocks.
Program control will look at subroutines (sometimes referred to as methods or functions), conditional statements, and looping statements. These three items can be combined to reduce your code length, make your program easier to read, and in turn easier to troubleshoot.
We will be looking at each of these instructions that are available using productivity blocks. A sample program will then be discussed that will contain some program control as a demonstration. Let’s get started. Continue Reading!