
76 Make: Robotic Arms
Lastly, we need to tell the for loop exactly how to count. This might seem
strange, but this last section represents one of the really useful features of
the for loop. We can tell it to count exactly how we’d like to. We could have
it count up or down, by twos or by fives—anything. Here, in our first loop,
we want to count up from 0 and count one at a time, so we use the C++
shorthand command for adding 1 to a value, which is written as count++.
When we put it all together, we get the line of code for (count = 0;
count < 90; count++), which is what we need to create our first for loop.
Now, we can write code we want our loop ...