wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Arduino Programming Quiz

Total questions: 11

Worksheet time: 6mins

Name
Class
Date
1.

In the LED Example, Which Arduino pin is defined to control the LED?

a)

8

b)

12

c)

13

d)

2

2.

What is the purpose of the pinMode function in the Arduino code?

a)

To set the defined pin as input or output

b)

To turn the LED on

c)

To delay the program

d)

To define the LED pin number

3.

Which function is used to turn the LED ON in the code?

a)

digitalWrite(myLED, LOW)

b)

pinMode(myLED, OUTPUT)

c)

delay(1000)

d)

digitalWrite(myLED, HIGH)

4.

In this code, explain the sequence of operations that occur in the loop() function of the code.

a)

LED turns ON, waits 1 second, turns OFF, waits 1 second, repeats

b)

LED turns OFF, waits 1 second, turns ON, waits 1 second, repeats

c)

LED turns ON, waits 2 seconds, turns OFF, waits 2 seconds, repeats

d)

LED turns ON, turns OFF, repeats without delay

5.

In this Code, How does the use of #define help us do?

a)

It turns the LED ON

b)

It sets the pin mode to output

c)

It assigns a name to the pin number where the LED is connected

d)

It delays the program

6.

In this code, which term is used to read the value from the potentiometer?

a)

digitalWrite()

b)

analogRead()

c)

pinMode()

d)

Serial.begin()

7.

What type of device is a potentiometer?

a)

Analog Input Device

b)

Digital Output Device

c)

Analog Output Device

d)

Digital Input Device

8.

Which statement best describes the role of a 'Serial Monitor'?

a)

It powers the Arduino board

b)

It displays information from the Arduino

c)

It stores the code

d)

It controls the potentiometer

9.

What was the maximum value we got from the potentiometer using analogRead() in Arduino?

a)

4095

b)

255

c)

512

d)

1023

10.

Which function is used to start the Serial communication in the Arduino code?

a)

Serial.setup()

b)

Serial.start()

c)

Serial.begin()

d)

Serial.init()

11.

What is the purpose of the delay function in the Arduino code?

a)

To initialize the Serial communication

b)

To turn the LED OFF

c)

To read sensor values

d)

To pause the program for a specified time