wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Intro to Arduino Test__

Total questions: 30

Worksheet time: 23mins

Name
Class
Date
1.

How many void setup( ) functions can you include in a sketch

a)

As many as you declare in the void setup( ) function.

b)

two

c)

As many as you want.

d)

one

2.

A push-button switch is connected to Pin 2.

A red LED is connected to Pin 3.

A green LED is connected to Pin 4.

What word needs to be inserted into blank A?

a)

INPUT

b)

input

c)

Write

d)

OUTPUT

3.

A push-button switch is connected to Pin 2.

A red LED is connected to Pin 3.

A green LED is connected to Pin 4.

What word needs to be inserted into blank C?

a)

INPUT

b)

input

c)

OUTPUT

d)

output

4.

A push-button switch is connected to Pin 2.

A red LED is connected to Pin 3.

A green LED is connected to Pin 4.

Complete the program so that when the button is pressed, the red LED is on and the green LED is off. When the button is not pressed the red LED is off and the green LED is on.

What word needs to be inserted into blank D?

a)

DigitalRead

b)

digitalread

c)

DigitalWrite

d)

digitalRead

5.

A push-button switch is connected to Pin 2.

A red LED is connected to Pin 3.

A green LED is connected to Pin 4.

Complete the program so that when the button is pressed, the red LED is on and the green LED is off. When the button is not pressed the red LED is off and the green LED is on.

What word needs to be inserted into blank E?

a)

high

b)

ON

c)

LOW

d)

HIGH

6.

A program written with the IDE for Arduino is called a ____________

a)

Editor

b)

Console

c)

Sketch

d)

IDE error

7.

The (-) column on your breadboard represents the ground and is conected to GND on your Arduino.

a)

true

b)

false

8.

An output is something that happens when a circuit is in use.  An example of an output is:

a)

Light flashing

b)

Buzzer sounding

c)

Temperature being given on a screen

d)

All of the answers are correct

9.

digitalWrite (LED1, HIGH);

delay(1000);

digitalWrite (LED1, LOW);

What does the program do?

a)

LED Switch ON at the beginning, wait for 1s and then switch OFF.

b)

LED Switch Off at the beginning, wait for 60s and then switch ON.

c)

LED Switch ON at the beginning, wait for 10s and then Switch OFF.

d)

LED Switch ON at the beginning, wait for 1s and then switch ON.

10.

These pins are:

a)

Digital pins

b)

Analog pins

c)

PWM pins

d)

Oscillating pins

11.

This symbol is used to end a statement

a)

!

b)

"

c)

;

d)

\

12.

Which command is called when a sketch starts. Use it to set pin modes, start using the serial monitor, etc. It will only run once, after each power up or reset of the Arduino board.

a)

loop ( )

b)

setup ( )

c)

delay( )

d)

input( )

13.

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

a)

loop ( )

b)

delay( )

c)

setup ( )

d)

input( )

14.

Comparison operator which means assign a name to.

a)

++

b)

==

c)

=

d)

!=

15.

Where should you assign names to components or variables?

a)

At the top

b)

At the bottom

c)

In the setup()

d)

In the loop()

16.

Where should you set a component as an Input or Output?

a)

At the top

b)

At the bottom

c)

In the setup()

d)

In the loop()

17.

In a sketch, where is the command to start the serial monitor usually placed?

a)

In the void loop( ) function

b)

In the void setup( ) function.

c)

Before the void setup( ) function

d)

Anywhere

18.

what does a delay( ) function do?

a)

It slows down the speed of a motor.

b)

It returns the number of milliseconds that have elapsed since the Arduino board was last reset

c)

It pauses the program for a designated time.

d)

It pauses the program while a specified condition is true

19.

Code comments start with what symbol?

a)

#

b)

{

c)

**

d)

//

20.

int Led1=4; // Row1

void setup() { // Row2

digitalWrite (LED1, HIGH); // Row3

} // Row4

Error message: LED1 was not declared in this scope.

Pick rows you can edit to correct the error?

a)

Row1

b)

Row2

c)

Row3

d)

Row4

21.

correct syntax for receiving Digital Signal in Arduino from an input

a)

digitalRead(buttonPin); 

b)

digitalread(buttonPin);

c)

digitalRead(buttonPin)

d)

DigitalRead(buttonPin); 

22.

correct syntax to send a Digital Signal in Arduino to an output

a)

digitalWrite(LEDPin, HIGH);

b)

digitalwrite(LEDPin, HIGH);

c)

DigitalWrite(LEDPin, HIGH);

d)

digitalWrite(LEDPin);

23.

Why won’t this code compile?

a)

Serial.start(9600); should be Serial.begin(9600);

b)

Serial.println("Testing"); should be Serial.print("Testing");

c)

The baud rate must be 57600.

d)

There is no delay in loop()

24.

What does this function does?

digitalWrite ()

a)

writes output value to either HIGH or LOW

b)

writes output value using PWM sequence

c)

sets a pin to either INPUT or OUTPUT

d)

pauses the program

25.

What does this function does?

pinMode ()

a)

writes output value to either HIGH or LOW

b)

writes output value using PWM sequence

c)

sets a pin to either INPUT or OUTPUT

d)

pauses the program

26.

What is B pointing to?

a)

Arduino Button

b)

Power Button

c)

Reset Button

d)

Digital Pins

27.

What is C pointing to?

a)

Arduino Button

b)

USB Port

c)

Pins 6 through 7

d)

Input Pins

28.

Error messages appear at the bottom of the Arduino IDE and highlight the lines of code associated with the errors

a)

True

b)

False

29.

There are always an even amount of curvy brackets { in a sketch

a)

True

b)

False

30.

void loop() {

buttonState = digitalRead(buttonPin);

}

What does this code do?

a)

Sends an electrical signal to a button

Turns on an LED

b)

Receives a signal from a button and names the signal buttonState

c)

Turns on an LED

d)

Receives a signal from a button