Font size
WorksheetsArduino2
Total questions: 35
Worksheet time: 18mins
Which Arduino function runs only once when the board is powered or reset?
loop()
setup()
start()
What does pinMode(13, OUTPUT); do?
Reads analog data from pin 13
Sets pin 13 as input
Sets pin 13 as output
What is the use of digitalWrite(pin, HIGH);?
Reads digital input
Sets pin to LOW
Outputs a high voltage (5V) on the pin
Which values can digitalRead() return?
0–1023
true/false
HIGH/LOW
Which function is used to set a digital pin to input mode?
digitalRead()
pinMode(pin, INPUT);
analogRead()
What is the range of values returned by analogRead()?
0–255
0-1023
0-1024
Which pin label is used for analog input on Arduino ?
D0-D13
A0-A5
A0-A7
What does analogRead(A0) do?
Writes analog voltage to A0
Reads digital input from A0
Reads analog voltage at pin A0
How many digital pins are there on Arduino?
14
13
12
Which pins support PWM output on Arduino?
2, 4, 6
3, 5, 6, 9, 10, 11
A0–A5
What function is used to output PWM?
digitalWrite()
analogRead()
analogWrite()
What is Serial.begin(9600); used for?
Begin analog input
Start PWM at 9600 Hz
Initialize serial communication at 9600 baud
What does Serial.print() do?
Reads data
Sends data to Serial Monitor
Clears serial port
Which library is required to control a servo motor?
ServoLib
Servo.h
What does servo.attach(9); do?
Reads data from pin 9
Sends data to servo
Attaches a servo object to pin 9
What range of values does servo.write() accept?
0-360
0-180
Which function moves a servo to a specific angle?
servo.angle()
servo.move()
servo.attach()
servo.write()
What does an IR sensor typically detect?
Water
Heat
Infrared light
What is the typical output of a digital IR sensor?
Analog voltage
HIGH or LOW
What happens when an object is detected by a typical IR proximity sensor?
Output becomes LOW
Output becomes HIGH
What does a relay do?
Measures voltage
Electrically switches a circuit
Amplifies signals
What type of signal is used to trigger a relay from Arduino?
Analog
Digital(HIGH/LOW)
What does an ultrasonic sensor measure?
Light
measure
heat
What is the unit of distance measured by ultrasonic sensor?
cm
m
ft
Which two pins are used to interface with ultrasonic sensor?
TX and RX
Trigger and Echo
What does an LDR detect?
Light intensity
Motion
What is the purpose of a resistor in an Arduino circuit?
Amplify signal
Limit current
Store energy
Which color code represents 10kΩ resistor?
Brown, Black, Orange
Red, Red, Brown
Brown, Black, Yellow
Which sensor would you use for object detection in a smart car?
LDR
relay
IR
resistor
To measure how far an object is from a sensor, use:
LDR
Relay
IR Sensor
Ultrasonic Sensor
Which control structure is used to make decisions in code?
if
loop
for
while
What type of value does analogRead() return?
float
integer (0–1023)
string
Which symbol is used for “equal to” comparison in Arduino?
==
=
Which function is used to receive data via Bluetooth in Arduino code?
In a Bluetooth control app, what type of data is usually sent to Arduino?
Digital HIGH/LOW
Text or character commands (e.g., '1', 'A')
PWM signals
