
117Chapter 6: Intermediate Inverse Kinematics
GENERATING AN ARRAY
Generating a simple array in Arduino is nice and simple—all we need are
a few lines of code. We can establish an array by first setting the data type
of the items in the list, giving the list a name, and telling the program how
many items are in the array. We can accomplish all this at once with this line
of code:
int myArray[5] = {10, 20, 30, 40, 50};
Then we can use a for loop to access all the items in the array. To access the
first item, call the array and put the location of each item in the parentheses.
One thing to keep in mind: Computers (the Arduino) included, always begin ...