wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Introduction to Arduino ( Part III )

Total questions: 15

Worksheet time: 14mins

Name
Class
Date
1.

What is the purpose of the Serial.begin() function in Arduino?

a)

To initialize the serial communication at a specific baud rate

b)

To begin the execution of the main program

c)

To initialize the GPIO pins

d)

To declare a new library

2.

What does the "Wire.begin()" function do in Arduino programming?

a)

Initializes the SPI communication

b)

Initializes the I2C communication

c)

Initializes the ADC

d)

Initializes the PWM pins

3.

Which Arduino library function is used to control the speed of a DC motor connected to an H-bridge?

a)

analogWrite()

b)

digitalWrite()

c)

Servo.attach()

d)

Stepper.setSpeed()

4.

Which Arduino library function is used to set the resolution and gain of the ADC (Analog-to-Digital Converter)?

a)

analogReference()

b)

analogRead()

c)

analogWrite()

d)

attachInterrupt()

5.

What does "millis()" function do :

a)

Returns the number of milliseconds

b)

Pauses the program for 1milli seconds

c)

Stops the program execution

d)

Returns the number of seconds

6.

"flashDotOrDash” and “flashSequence” functions involve :

a)

Morse code signaling

b)

Mirror code signaling

c)

Mouse code signaling

d)

Meta code signaling

7.

What is the use of "visual indicator" function?

a)

Providing visual feedback

b)

It visualize the code

c)

Providing visual

d)

None of these

8.

What the "shiftOut" function do?

a)

It shifts 2 byte data

b)

Writes a byte of

data to a shift register

c)

It shifts code to compiler

d)

It shifts code to other line

9.

What will be the output of the following Arduino code?

a)

0xAB

b)

0xa

c)

0

d)

Error

10.

What will be the output of the following Arduino code?

a)

10.21

b)

8

c)

null

d)

23

11.

What is the output of “pin1” if “pin2” is sent “1011” where 1 is 5V and 0 is 0V?

a)

1110

b)

0100

c)

1111

d)

1011

12.

What is the purpose of the following Arduino code?

a)

Send a signal to pin 40 on the Arduino board

b)

Send a octal number of 40 through the Serial pins

c)

Send a byte with value 40 through the Serial pins

d)

Send a hexadecimal number of 40 through the Serial pins

13.

What is the output of the program given below if a voltage of 5V is supplied to the pin corresponding to the A0 pin on an Arduino UNO?

a)

0

b)

1024

c)

null

d)

Error

14.

What will be the output of the following Arduino code?

a)

01234

b)

56789

c)

6789

d)

9101112

15.

What the " abs(x)" function do?

a)

Absorbs an interrupt

b)

Returns the absolute value

c)

Returns the abstract value

d)

Abstract the program code