1/4
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
What is void setup() used for?
setup() runs once when the Arduino starts or resets.
It is commonly used to configure pins and initialise components.
What is void loop() used for?
loop() runs continuously/in an infinite loop while the Arduino is operating.
What is the difference between setup() and loop()?
setup() → runs once
loop() → runs repeatedly
Easy memory trick:
SETUP = Set things up once.
LOOP = Keep doing it.
What does this code mean?
void setup() {
pinMode(2, INPUT);
pinMode(13, OUTPUT);
}
When the Arduino starts:
Pin 2 is configured as an INPUT
Pin 13 is configured as an OUTPUT
Why does loop() need to run continuously in an interactive system?
So the Arduino can continuously check inputs, process information and respond with outputs.