Study for the Internet of Things (IOT102) Test. Access comprehensive flashcards and multiple choice questions, each with hints and explanations. Get prepared for your exam!

Multiple Choice

Which Arduino function is called only once at program start?

Initialization happens once at startup. In an Arduino sketch, the setup function is called only once when the board powers up or resets. It’s used to configure pins, initialize serial communication, and perform other one-time preparation tasks. After setup finishes, the loop function begins and runs repeatedly, handling the ongoing behavior of the program. The delay function simply pauses the program for a specified time and can be used inside loop (or elsewhere); it isn’t limited to a single call. The start function isn’t part of the Arduino core. So the function that runs only once at program start is the setup function.

Initialization happens once at startup. In an Arduino sketch, the setup function is called only once when the board powers up or resets. It’s used to configure pins, initialize serial communication, and perform other one-time preparation tasks. After setup finishes, the loop function begins and runs repeatedly, handling the ongoing behavior of the program. The delay function simply pauses the program for a specified time and can be used inside loop (or elsewhere); it isn’t limited to a single call. The start function isn’t part of the Arduino core. So the function that runs only once at program start is the setup function.