Test your understanding of defining, calling, and using simple functions in Arduino code
32-Lesson Course • Semester 1
What is a function in Arduino programming?
Which two functions are already part of every basic Arduino sketch?
Which line correctly calls a function named printWelcome?
printWelcome
void
What does void usually mean at the beginning of a beginner function definition?
What is a parameter in a function like void printResult(int answer)?
void printResult(int answer)
If the code says showTemperatureConversion(25.0);, what value is being sent into the function?
showTemperatureConversion(25.0);
Which is the best reason to use functions in a beginner Arduino program?
What does this function do?void printResult(int answer) { Serial.println(answer); }
void printResult(int answer) { Serial.println(answer); }
Explain what happens when showAddition(7, 5); calls a function that adds the two numbers and prints the answer.
showAddition(7, 5);
Describe a simple Arduino program that uses functions. What functions did you make, what values or hardware did they use, and what did the program do?
These results have been automatically sent to your instructor.