From the course: Learning Arduino: Interfacing with Hardware

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Optional review: Understanding arrays

Optional review: Understanding arrays - Arduino Tutorial

From the course: Learning Arduino: Interfacing with Hardware

Start my 1-month free trial

Optional review: Understanding arrays

- So for the next example using the LCD, I'm going to use an Array in order to demonstrate how to populate the data. If you're familiar with arrays, feel free to skip this video, but if you want to refresh your memory about what an array is, I'm going to go through the basics. An array stores multiple data values for the same data type in a block of memory, allowing you to access the elements within the array by referring to the variable name. So you can think about it as a drawer with a certain number of sections, and inside each section is an array element. The drawer has a name, which is the array name. So now let's go through how to declare an array. The way to declare an array is by specifying the type of the element, which can be double, integer, whatever the type is, and then specifying the array name, and finally the array size. The array size should be an integer above zero. So this is an example that declares an array variable called myArray that stores up to 10 integer…

Contents