Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Engineering challenge light box test

Total questions: 36

Worksheet time: 17mins

Name
Class
Date
1.

What three sections of code did you have in the Arduino project sketch?

a)

Comment block, variable definitions, and run section.

b)

Comment block, if section, and loop function.

c)

Variable definitions, loop function, and finalize function.

d)

Variable definitions, setup function, and loop function.

2.
How long is the LED on?

digitalWrite(13, HIGH); 
 
delay(1000);   
digitalWrite(13, LOW); 
 
delay(1000); 
a)
1000 seconds
b)
100 seconds
c)
1 second
d)
100 milliseconds
3.
Which statement do you change to alter the time?
void setup()
{  
pinMode(13, OUTPUT);

}
void loop()
{  
digitalWrite(13, HIGH); 
  delay(1000);   
digitalWrite(13, LOW); 
  delay(1000); 
}
a)
delay
b)
void loop
c)
digitalWrite
d)
pinMode
4.
Which means keep going forever?
void setup()
{  
pinMode(13, OUTPUT);

}
void loop()
{  
digitalWrite(13, HIGH); 
  delay(1000);   
digitalWrite(13, LOW); 
  delay(1000); 
}
a)
OUTPUT
b)
void setup
c)
void loop
d)
digitalWrite
5.
Which symbol begins a comment?
a)
;
b)
:
c)
.
d)
//
6.
Which symbol ends a statement?
a)
Semicolon ;
b)
Parenthesis )
c)
Comma ,
d)
Curly Brace }
7.
An opening curly brace "{" must always be followed by a closing ___________
a)
be followed by a closing "\\"
b)
be followed by a closing ";"
c)
be followed by a closing "//"
d)
be followed by a closing curly brace "}".
8.
If you have connected a red wire to pin 7 on the Arduino board. The code has to be the following......
a)
pinMode(7,OUTPUT)
b)
pinMode(8, OUTPUT)
c)
pinMode(11, OUTPUT)
d)
pinMode(4, OUTPUT)
9.
Writes a HIGH or a LOW value to a digital pin.
a)
digitalWhat
b)
digitalWet 
c)
digitalWrong
d)
digitalWrite
10.
The pinMode() function configures a pin as either ______or In ________
a)
High or Low
b)
Input or Output
c)
Input or Off
d)
Inside or Outside
11.
The void loop() function does precisely what its name suggests, and loops ____and ______,
a)
One and Done
b)
Once and Twice
c)
Once and Never
d)
Over and Over
12.
The work area where you program and upload your Arduino code is called...?
a)
Interactive design environment
b)
Integrated development environment
c)
Interactive development encounter
d)
Isolated development environment
13.

What is the symbol used for the logical AND in an "if" statement?

a)

||

b)

&&

c)

*

d)

@

14.

What does the "void" statement mean before the "setup" and "loop" functions?

a)

The function needs no variables.

b)

The function takes no input.

c)

The function returns nothing.

d)

The function returns a variable named "void".

15.

For a "threshold" value of 500 and a "readInput" value of 425, what happens in the following code?


if ( readInput > threshold)

{

digitalWrite(LEDpin1, HIGH);

digitalWrite(LEDpin2, HIGH);

}

else

{

digitalWrite(LEDpin1, LOW);

digitalWrite(LEDpin2, LOW);

}

a)

LEDpin1 and LEDpin2 are turned on

b)

LEDpin1 and LEDpin2 are turned off

c)

Nothing happens to LEDpin1 and LEDpin2

d)

Colt falls at 9.8 meters per second

16.

What's the difference between analogWrite and digitalWrite? analogWrite(pin,0-255) vs digitalWrite(pin,LOW-HIGH)

a)

There is no difference in the two commands, they simply take different input values.

b)

digitalWrite will set the specified pin to one of two states, where analogWrite can set the pin to different values

c)

digitalWrite is used to control an LED and analogWrite is not

d)

digitalWrite can only be used in the loop() function and analogWrite can only be used in the setup() function

17.

Select the best answers based on the following code. When will LEDpin1 turn on?


if ((threshold > 400) && (threshold < 500))

{

digitalWrite(LEDpin1, HIGH);

}

else if ((threshold > 300) && (threshold < 400))

{

digitalWrite(LEDpin1, HIGH);

digitalWrite(LEDpin2, HIGH);

}

else

{

digitalWrite(LEDpin1, LOW);

digitalWrite(LEDpin2, LOW);

}

a)

If the threshold value is 475.

b)

If the threshold value is 350

c)

if the threshold value is 550

d)

If the threshold value is 275

18.
A sketch is
a)
an Arduino file
b)
an Arduino picture
c)
an Arduino board 
19.
Which means ON?
void setup()
{  
pinMode(13, OUTPUT);

}
void loop()
{  
digitalWrite(13, HIGH); 
  delay(1000);   
digitalWrite(13, LOW); 
  delay(1000); 
}
a)
OUTPUT
b)
HIGH
c)
LOW
d)
delay
20.
Which of the following is true about comments added in the Arduino code?
a)
A.  Comments help you understand how your program works
b)
A.  Comments take up too much space and should never be used
c)
A.  Comments are only there for high level programmers
21.
In the void setup()...The setup function will only run_____.
a)
Once
b)
Twice
c)
Always
d)
Never
22.
Why is a resistor important?
a)
It isn't important
b)
It increases the power of a circuit
c)
It controls the flow of electricity by lessening it to a certain amount
23.
A potentiometer is also known as a ___________________
a)
knob
b)
button
c)
variable resistor
24.
A push button on a circuit is an ___________
a)
input
b)
output
c)
command
d)
variable
25.
What is a relay?
a)
A type of race between LEDS
b)
A switch that turns the light on
c)
An electrically controlled mechanical switch
26.
What component do you need to add to a circuit  in order to make the servo motor spin?
a)
diode
b)
transistor
c)
LED
d)
resistor
27.
What do you have to consider when creating a circuit with multiple LEDs?
a)
Each LED has to be connected by a separate jumper wire into a different pin.
b)
There can only be a certain number of resistors.
c)
The board can overload if you place too many LEDs on the board.
d)
All jumper wires have to be the same color.
28.
This is a ________ circuit.
a)
Series
b)
Parallel
29.
This is a ______________ circuit.
a)
Series
b)
Parallel
30.
Rt=
a)
180
b)
450
c)
135
d)
9
31.
What is the formula for RT in a parallel circuit?
a)
Rt = R1 + R2 + R3 ...
b)
1/RT = 1/R1 + 1/R2 + 1/R3 ...
32.
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)
33.
The programming language used by the Arduino microprocessor is _________?
a)
Java
b)
Python
c)
C++
d)
PHP
34.
What is an electrical circuit?
a)
An electrical loop with a starting point and an ending point.
b)
An arduino board
c)
A circuit that has leds, potentiometers, positive and negative volts.
35.
The (+) column on your breadboard represents the positive charge or power to your circuit.
a)
True
b)
False
36.
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
d)
All of the answers are correct