WorksheetsLong Quiz (Finals)
Total questions: 60
Worksheet time: 46mins
In Arduino, what would happen if the condition inside an if statement is false?
The program stops running
The statements inside the if block execute
The statements inside the else block execute
The Arduino resets
What does this line of code do: int buttonState = digitalRead(2);
Reads the analog voltage from pin 2
Reads a digital signal (HIGH or LOW) from pin 2
Sets pin 2 as an output
Sends a HIGH signal to pin 2
In the for loop for (int i = 0; i < 10; i++), how many times will the loop execute?
9 times
10 times
11 times
Infinite times
What is the main difference between a for loop and a while loop in Arduino?
for loop executes slower than while
while loop can only handle integers
for loop is used when the number of repetitions is known, while while is not
while loop executes before checking the condition
What does the function analogRead(A0); return?
A value between 0 and 1023 based on sensor voltage
A Boolean true or false
A value between 0 and 255
The digital state of pin A0
Which of the following best describes digitalWrite(13, HIGH);?
Reads the current from pin 13
Sets pin 13 as input
Sends 5V output to pin 13, turning it ON
Sends 0V output to pin 13, turning it OFF
In Arduino, what keyword defines a function that does not return a value?
void
return
func
null
Which is TRUE about combining logic with analog input?
The analog input can only read 0 or 1
Logic cannot be applied to analog values
The sensor value is always 1023
Logic uses threshold values to make decisions from analog readings
In this code if (sensorValue > 500), what happens if the value equals 500?
The condition is true
The LED turns ON
The program crashes
The condition is false, and the else part runs
What happens in a while loop when the condition never becomes false?
The loop runs once
The loop becomes infinite and never stops
The program skips the loop
The Arduino resets automatically
Why is it important to use functions in Arduino programs?
They reduce program memory
They make code slower but safer
They make code modular, reusable, and easier to debug
They replace the need for loops
What is the role of Serial.begin(9600); in Arduino?
Configures pin 13 for output
Initializes serial communication for monitoring values
Reads analog input from sensors
Declares variables for input and output
In the LED blink example using a for loop, what will happen if delay(500); is removed?
The LED will blink too fast to be visible
The LED will not blink at all
The LED will stay ON
The LED will blink 5 times only
The statement pinMode(buzzerPin, OUTPUT); means:
The buzzer pin is configured to send output signals
The buzzer pin will only receive signals
The buzzer will read analog values
The pin is set as input by default
What will happen if you forget to include an else statement in a conditional block?
The program will throw an error
Only the if part will execute when the condition is true, nothing happens otherwise
The program will automatically add a default else
The code won’t compile
What happens when you call blinkLED(); inside the loop()?
The LED stays OFF
permanently
The LED turns ON
and OFF once per
call
The LED blinks continuously
The LED’s brightness changes gradually
Why is using functions helpful in debugging Arduino projects?
They increase the loop count
They isolate code sections so errors are easier to locate
They remove syntax errors
They automatically log outputs to Serial Monitor
What will happen if while (digitalRead(2) == LOW) is used and the button is never pressed?
The LED will blink rapidly
The LED will stay ON indefinitely
The LED will stay OFF
The code will skip the loop
In the analog sensor example, why do we compare sensorValue > 500?
To detect if the LED is ON
To convert the reading to digital
To set a threshold for when to activate an output
To reset the sensor’s value
What does it mean when we say Arduino becomes “intelligent” with logic and loops?
It can self-correct errors
It can connect to the Internet
It can make decisions and repeat actions efficiently
It can program itself automatically
MIT App Inventor is best described as a
Text-based programming tool
Hardware design software
Block-based visual programming environment
Mobile hardware emulator
The Designer View in App Inventor is mainly used for
Writing event blocks
Arranging UI components
Testing Bluetooth connection
Storing media files
Which component is used to trigger actions in an app?
Image
Label
Slider
Button
The HC-05 module is commonly used for
WiFi communication
Bluetooth communication
Infrared transmission
RFID scanning
The Block that responds to user actions is called
Variable block
Procedure block
Event block
Logic block
The App Inventor AI2 Companion is used to
Edit images
Export APK files
Preview apps in real time
Create icons
Which layout stacks components from top to bottom?
Table Arrangement
Grid Layout
Horizontal Arrangement
Vertical Arrangement
Slider.PositionChanged is triggered when
Screen loads
Button is clicked
Slider value is moved
Phone vibrates
The Assets panel is used to store
Variable names
Event handlers
Bluetooth addresses
Images, icons, and sounds
Which component allows the user to pick from a dropdown menu?
ListView
Spinner
TextBox
Switch
In App Inventor, changing Label.Text is an example of modifying
Procedures
Permissions
Hardware
Component properties
The default PIN for many HC-05 modules is
1234
9876
5678
2222
A clean and simple interface helps by
Making coding harder
Improving user readability
Increasing screen clutter
Slowing performance
Which component displays multiple items in a scrollable list?
Image
ListView
Switch
Notifier
To show a popup alert message, you use
Spinner
Button
Slider
Notifier
The best reason for using block-based programming is
It hides all logic
It reduces syntax errors
It requires memorizing code
It only works offline
The Phone must grant which permission for Bluetooth scanning?
Camera
Microphone
Location
Storage
The Table Arrangement layout is designed to
Set colors
Organize items in rows and columns
Control sound
Send data to Arduino
The main purpose of event handling is to
Store photos
Respond to user actions
Change app language
Upload apps to Play Store
A Label is commonly used for
Sending Bluetooth messages
Opening another screen
Displaying text or values
Picking a date
The Arduino Uno uses which type of microcontroller chip?
ATmega16U2
ATmega328P
ATtiny85
ATmega2560
Which of the following best describes the function of the setup() function in Arduino?
Executes continuously while the board is powered
Runs only once at the start of the program to initialize settings
Stores variables used in the loop
Handles input from the Serial Monitor
The analog pins A0–A5 on the Arduino Uno can read voltage levels from:
0 to 3.3V
0 to 5V
0 to 10V
–5V to 5V
Which component converts analog signals into digital values that the microcontroller can understand?
PWM Converter
DAC
ADC
Shift Register
When using digitalWrite(pin, HIGH);, what voltage is typically output on the Arduino Uno?
3.3V
9V
5V
0V
The delay(1000); command in Arduino pauses the program for:
100 seconds
100 milliseconds
10 seconds
1 second
The I2C adapter on a 16×2 LCD allows communication using how many Arduino pins?
8
4
2
6
Which of the following is true about the Arduino IDE?
It can only run on Windows.
It compiles and uploads C/C++-based code to Arduino boards.
It does not require a USB connection to upload code.
It only works with Arduino Uno boards.
In the Arduino Uno, which pins are used for I2C communication?
A4 (SDA) and A5 (SCL)
10 and 11
0 (RX) and 1 (TX)
2 and 3
The function pinMode(13, OUTPUT); tells the Arduino to:
Read analog input from pin 13
Send digital output signals through pin 13
Convert pin 13 to analog mode
Turn off the digital output
Which module in the Arduino kit can read RFID tags or cards?
HC-SR04
ULN2003
DHT11
RC522
The Serial.begin(9600); function initializes:
PWM communication
Serial communication at the stated bits per second
Analog signal reading
Stepper motor speed
The purpose of a resistor in an LED circuit is to:
Increase current flow
Limit current to prevent LED damage
Store electrical charge
Convert DC to AC
Which Arduino component is designed to measure distance using sound waves?
HC-SR04 Ultrasonic Sensor
DHT11
LM35DZ
RC522
The ULN2003 driver module is mainly used to:
Read analog inputs
Display numeric output
Control stepper motors safely
Amplify audio signals
In digital electronics, a LOW state usually represents:
3.3V
9V
0V
5V
Which statement best describes the difference between analog and digital signals?
Analog has only two states; digital is continuous.
Digital changes gradually; analog switches instantly.
Analog is continuous; digital has discrete states.
Both use continuous voltage ranges.
What happens if you forget to set the correct COM port in the Arduino IDE before uploading code?
The code will compile faster.
The IDE will fail to upload
The board will overheat.
The program will still run automatically.
The analogRead(A0); function returns values between 0 and 1023. What physical quantity does this number represent?
The voltage level on the analog pin relative to 5V.
The amount of current flowing through the pin.
The number of cycles per second measured on the pin.
The temperature of the connected component.
What is the main consequence of mismatched baud rates between the Arduino code and the Serial Monitor?
Data will appear as random or unreadable characters.
The Arduino will automatically correct the baud rate.
The Serial Monitor will display nothing but stay connected.
The Arduino IDE will terminate the upload process.
