Question: Write an Arduino program that globally declares an array of size fifteen. The array data type is int. (20 points) 1. Write a function that

Write an Arduino program that globally declares an array of size fifteen. The array data type is int. (20 points) 1. Write a function that fills the array with random values in the range [low, high]. The function has two parameters: low, high. The array is not a function parameter because it has been declared globally. Write a function that serially tranmits the array data. The function has one parameter that controls the number of array elements printed on the same line. For example, assume the function is called printArray. If we want 3 array elements to be printed on one line, then the function call is printArray(3). We would see something like this for output: Array 3 14 7 0 3 2 7 1 11 9 5 710 4 -28 See how there are 3 values printed per line? 3 is the value passed to the function parameter that controls the number of array elements printed on one line. There should be at least one space between array elements printed. In the loop function, call the function that fills the array with random values and then call the print array function. Each time through the loop, the array is filled with random values and then serially transmitted (printed). Write an Arduino program that globally declares an array of size fifteen. The array data type is int. (20 points) 1. Write a function that fills the array with random values in the range [low, high]. The function has two parameters: low, high. The array is not a function parameter because it has been declared globally. Write a function that serially tranmits the array data. The function has one parameter that controls the number of array elements printed on the same line. For example, assume the function is called printArray. If we want 3 array elements to be printed on one line, then the function call is printArray(3). We would see something like this for output: Array 3 14 7 0 3 2 7 1 11 9 5 710 4 -28 See how there are 3 values printed per line? 3 is the value passed to the function parameter that controls the number of array elements printed on one line. There should be at least one space between array elements printed. In the loop function, call the function that fills the array with random values and then call the print array function. Each time through the loop, the array is filled with random values and then serially transmitted (printed)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
