wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Robotics Week 2

Total questions: 16

Worksheet time: 3mins

Name
Class
Date
1.

How many times will the code inside the

"void setup ()"

run?

a)

Once

b)

Only when called

c)

Forever until the power is cut

2.

How many times will the code inside the

"void loop()"

run?

a)

Once

b)

Only when called

c)

Forever until the power is cut

3.

If I want to

TURN ON AN LED

which function should I use?

a)

digitalRead()

b)

digitalWrite()

c)

analogRead()

d)

analogWrite()

4.

If I want to

CONTROL THE SPEED OF A MOTOR

which function should I use?

a)

digitalRead()

b)

digitalWrite()

c)

analogRead()

d)

analogWrite()

5.

If I want to

IMPLEMENT A BUTTON

which function should I use?

a)

digitalRead()

b)

digitalWrite()

c)

analogRead()

d)

analogWrite()

6.

If I want to

IMPLEMENT A POTENTIOMETER

which function should I use?

a)

digitalRead()

b)

digitalWrite()

c)

analogRead()

d)

analogueWrite()

7.

I want to refer to pin 13 as greenLED in my code.

How can I do that?

a)

#include <greenLED.h>

b)

#define greenLED 13

c)

#define (greenLED, 13)

d)

#define 13 greenLED

8.

Arduino code is case sensitive

a)

TRUE

b)

FALSE

9.

Which timing options will allow me to multitask?

(select all)

a)

delay

b)

delayMicroseconds

c)

millis

d)

micros

10.

Which of these have

parameters but no returns?

(select all)

a)

delay

b)

delayMicroseconds

c)

millis

d)

micros

11.

Which of these have

returns but no parameters?

(select all)

a)

delay

b)

delayMicroseconds

c)

millis

d)

micros

12.

Which of these pseudocodes would have a

duty cycle of about 50%?

a)

(Pin1, HIGH);

delay(400);

(Pin1, LOW);

delay(200);

b)

(Pin1, HIGH);

delay(300);

(Pin1, LOW);

delay(600);

c)

(Pin1, HIGH);

delay(250);

(Pin1, LOW);

delay(250);

13.

Which of these pseudocodes would have a

duty cycle of about 33%?

a)

(Pin1, HIGH);

delay(400);

(Pin1, LOW);

delay(200);

b)

(Pin1, HIGH);

delay(300);

(Pin1, LOW);

delay(600);

c)

(Pin1, HIGH);

delay(250);

(Pin1, LOW);

delay(250);

14.

My sensor is not time critical.

What should I use?

a)

Polling

b)

Interrupt

15.

delay is the same thing as polling

a)

True

b)

False

16.

Serial Monitor is a useful tool

a)

True

b)

False. I am perfect and require no troubleshooting