1/22
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
What is an int in Arduino
A 16‑bit integer
What are the two required functions in every Arduino sketch?
setup() (runs once at start) and loop() (runs repeatedly).
What is a float in Arduino
A 32‑bit decimal (floating point) number
What symbol is used for comments in Arduino code
//
What is the purpose of the Arduino IDE "Verify" button
To compile the sketch and check for errors
What happens (to the code) when the Arduino is powered off
The last uploaded program remains in memory and runs again when powered back on
Give an example of an integer variable declaration
int alpha = 13579;
Why should you avoid long, double, or String types on Arduino Uno
They consume more memory, and Uno has limited memory (32 kB flash)
What keyword makes a variable unchangeable during execution
const
What is the difference between global and local variables
Global variables are accessible in all functions; local variables only within the function they’re declared
What does static do for a local variable
Preserves its value between function calls
Why does degC * (9/5) + 32 give the wrong result
Integer division truncates 9/5 to 1. Use floats (9./5) to fix
What does != mean
Not equal to
What is the difference between = and ==
= assigns a value; == compares values
What does i++ mean
Increment i by 1 (same as i = i + 1)
What does the following loop print
for(int i=1; i<=5; i++){ Serial.println(i); }
Numbers 1 through 5
What are the Arduino Uno analog input pins
A0–A5
What is the resolution of the Uno’s ADC
10-bit (values 0–1023)
What pin can change the ADC reference voltage
AREF
Difference between Serial.print and Serial.println
print stays on the same line; println adds a line break
What command raises a number to a power
pow(x, n);
What command reads a digital input from a pin
digitalRead(pin);
What command reads an analog voltage from a pin
analogRead(pin);