wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Arduino Revision 12

Total questions: 25

Worksheet time: 22mins

Name
Class
Date
1.

A program written with the IDE for Arduino is calle

a)

Editor

b)

Console

c)

Sketch

d)

IDE error

2.

delay (1000);

1000 in delay is equivalent to how many second?

a)

10s

b)

2s

c)

60s

d)

1s

3.

Which command is called repetitively over and over again as long as the Arduino has power.

a)

loop ( )

b)

(output)

c)

setup ( )

d)

(input)

4.
A function is a series of programming statements that can be called by name. Which command is called once when the program starts:
a)
loop()
b)
setup()
c)
(output)
d)
(input)
5.

A==7 means

a)

A is equal to 7

b)

7 is assigned as an int A

c)

A is not equal to 7

d)

A is greater than 7

6.

What does A&&B mean

a)

It is a logical AND operator

b)

It is a logical OR operator

c)

It is a multiplication operator

d)

it is a division operator

7.

If my function rule is y=x + 3, what is the OUTPUT if the input is 4?

a)

4

b)

3

c)

7

d)

10

8.

The following line of code, means ________

pinMode(13, OUTPUT);

a)

Make the device in pin 13 set to ON state.

b)

Set the device in pin 13 as output.

c)

Set the device in pin 13 as input.

d)

Make the device in pin 13 set to Off state.

9.

How many digital pin on Arduino board?

a)

5

b)

6

c)

13

d)

14

10.

To pause a system for 2 seconds in Arduino, we use ________ line code.

a)

delay(2);

b)

delay(20);

c)

delay(200);

d)

delay(2000);

11.

To use Serial monitor you have to write the following code

Serial.begin(9600);

a)

True

b)

False

12.

Choose the correct code for line 1 to declare the arduino pin number connected to LED.

a)

int LED = 1;

b)

int LED = 11;

c)

int LED = 13;

d)

int LED = GND;

13.

Which of the following command prints what is inside the brackets and starts a new line for the next message?

a)

Serial.begin(9600);

b)

Serial.print();

c)

Serial.println();

d)

(!Serial); (!Serial);

14.

The _________ function defines the mode of connection for digital components.

a)

pinMode()

b)

PINMODE()

c)

pinmode()

d)

PinMode()

15.

int x = 7;

x is an example of a/an ________________ data type in the code shown above.

a)

character

b)

boolean

c)

integer

d)

float

16.

How can you represent 'a = a+b' using compound operators?

a)

a++

b)

a+b

c)

a+=b

d)

a=+b

17.

choose the correct 'for - loop' syntax to decrease the brightness of LED from maximum brightness to zero. by a decrement of 20

a)

for (int brightness = 255; brightness>=0; brightness-=20)

b)

for (int brightness = 250; brightness>=0; brightness-=20)

c)

for (int brightness = 200; brightness>=0; brightness-=20)

d)

for (int brightness = 20; brightness>=0; brightness-=2)

18.

Which of the following is an example of analogue input?

a)

Buzzer

b)

LED

c)

Potentiometer

d)

Pushbutton

19.

The function of code in line 20 (delay(500);) is to observe the change in the brightness of the green LED for five seconds.

a)

True

b)

False

20.

Arithmetic operators perform mathematical operations.

a)

True

b)

False

21.

Boolean operators return either a true or false value.

a)

True

b)

False

22.

Logical OR operator is represented by && symbol.

a)

True

b)

False

23.

The instructions in an Arduino code are executed sequentially.

a)

True

b)

False

24.

Any computer program mainly uses arithmetic, rational, boolean and compound operators.

a)

True

b)

False

25.

Consider the code below:

int a = 8;

int c = 5;

A rational operator can compare the values of 'a' and 'c' to find the greater number between them.

a)

True

b)

False