Font size
WorksheetsArduino 2
Total questions: 75
Worksheet time: 50mins
Which line correctly includes the Servo library?
Servo.include{}
#include <Servo.h>
#include {Servo.h}
Servo.include()
servoLeft.Microseconds(1500) makes the servo...
Turn clockwise
Turn counterclockwise
Reverse direction
Stop
pinMode is used to set a pin on the breadboard. Which command is used to set a servo motor pin?
pinMode
servoLeft.attach()
Servo servoleft
servoMode()
If I want my BOE bot to move forward, how should my wheels be set?
servoLeft.writeMicroseconds(1600);
servoRight.writeMicroseconds(1600);
ServoLeft.writeMicroseconds(1600);
servoRight.writeMicroseconds(1400);
ServoLeft.writeMicroseconds(1500);
servoRight.writeMicroseconds(1500);
ServoLeft.writeMicroseconds(1400);
servoRight.writeMicroseconds(1400);
What is the correct layout for declaring a variable?
Datatype = Name = Value
Name = Datatype Value
Name Value = Datatype
Datatype Name = Value
Which if statement with print the numbers 1-10 in ascending order?
if (int i = 1; i<=10; i++)
{
Serial.println(i);
}
if (int i = 1; i<10; i++)
{
Serial.println(i);
}
if (int i = 0; i<11; i++)
{
Serial.println(i);
}
if (int i = 0; i<=10; i++)
{
Serial.println(i);
}
What will the the last two numbers this while loop prints?
int counter = 0;
while (counter < 12) {
Serial.println(counter);
counter=counter+2;
}
10, 12
11, 12
8, 10
9, 10
What will this code print?
int num1 = 6;
int num2 = 6*2;
if (num2==num1)
{
Serial.print("blue");
}
else if (num2!=num1)
{
Serial.print("red");
}
else if (num2>num1) {
Serial.print("purple");
}
else {
Serial.print("green")
}
blue
red
purple
green
Serial.print ("Hello");
Serial.println ("world!");
Serial.print( ":D");
If I ran this code, what would appear on the serial monitor.
Hello
world!
:D
Hello world! :D
Helloworld!
:D
Hello
world! :D
Name the datatype
'a'
String
char
int
float
Name the datatype
"bob"
String
char
int
float
Name the datatype
14
String
char
int
float
Name the datatype
3.14
String
char
int
float
What could I put in the blank to get "red"? Multiple answers
int foo = 17;
if (foo______17)
{Serial.print("red");}
else
{Serial.print("green");}
!=
<
<=
==
int i = 3;
while (i<6)
{
Serial.print("!");
i=i+1;
}
What gets printed?
!!!
!
!!!!
!!!!!!
What gets printed?
char letters[]={'a','b','c','d'};
Serial.print(letters[3]);
a
b
c
d
Which variable is declared correctly?
var foo == 2
var foo = 2
int foo = 2
char foo = 2
Which line correctly includes the Servo library?
Servo.include{}
#include <Servo.h>
#include {Servo.h}
Servo.include()
servoLeft.Microseconds(1500) makes the servo...
Turn clockwise
Turn counterclockwise
Reverse direction
Stop
pinMode is used to set a pin on the breadboard. Which command is used to set a servo motor pin?
pinMode
servoLeft.attach()
Servo servoleft
servoMode()
If I want my BOE bot to move forward, how should my wheels be set?
servoLeft.writeMicroseconds(1600);
servoRight.writeMicroseconds(1600);
ServoLeft.writeMicroseconds(1600);
servoRight.writeMicroseconds(1400);
ServoLeft.writeMicroseconds(1500);
servoRight.writeMicroseconds(1500);
ServoLeft.writeMicroseconds(1400);
servoRight.writeMicroseconds(1400);
What is the correct layout for declaring a variable?
Datatype = Name = Value
Name = Datatype Value
Name Value = Datatype
Datatype Name = Value
Which if statement with print the numbers 1-10 in ascending order?
if (int i = 1; i<=10; i++)
{
Serial.println(i);
}
if (int i = 1; i<10; i++)
{
Serial.println(i);
}
if (int i = 0; i<11; i++)
{
Serial.println(i);
}
if (int i = 0; i<=10; i++)
{
Serial.println(i);
}
What will the the last two numbers this while loop prints?
int counter = 0;
while (counter < 12) {
Serial.println(counter);
counter=counter+2;
}
10, 12
11, 12
8, 10
9, 10
What will this code print?
int num1 = 6;
int num2 = 6*2;
if (num2==num1)
{
Serial.print("blue");
}
else if (num2!=num1)
{
Serial.print("red");
}
else if (num2>num1) {
Serial.print("purple");
}
else {
Serial.print("green")
}
blue
red
purple
green
Serial.print ("Hello");
Serial.println ("world!");
Serial.print( ":D");
If I ran this code, what would appear on the serial monitor.
Hello
world!
:D
Hello world! :D
Helloworld!
:D
Hello
world! :D
Name the datatype
'a'
String
char
int
float
Name the datatype
"bob"
String
char
int
float
Name the datatype
14
String
char
int
float
Name the datatype
3.14
String
char
int
float
What could I put in the blank to get "red"? Multiple answers
int foo = 17;
if (foo______17)
{Serial.print("red");}
else
{Serial.print("green");}
!=
<
<=
==
int i = 3;
while (i<6)
{
Serial.print("!");
i=i+1;
}
What gets printed?
!!!
!
!!!!
!!!!!!
What gets printed?
char letters[]={'a','b','c','d'};
Serial.print(letters[3]);
a
b
c
d
Which variable is declared correctly?
var foo == 2
var foo = 2
int foo = 2
char foo = 2
Arduino can interact with...
buttons, leds
smartphone
sensors
all of the above
What are the uses of Arduino? Arduino?
Inexpensive
Cross-platform
Open source and extensible software
All of the above
Which software is used for Arduino?
EXE ARDUINO
TURBO C
IDEL
ARDUINO IDE
What does this button represents?
A. Right Column
B. Upload
C. Render
D. Upright
A sketch is
an Arduino file
an Arduino picture
an Arduino board
an Arduino sensor
Which of the following is the VERIFY icon?
The function returns a value to the - variable blinks, and then will blink the LED blinks .....................times with a delay of.................... seconds before repeating.
5; 2
5000; 2000
500; 2
5; 200
The value 9600 is the speed at which the data will travel between the computer and the Arduino, also known as baud. This value must match the speed setting at the bottom right of the Serial Monitor.
How to write the code?
Serial.begin(9600);
Serialln.begin(9600);
Serial.end(9600);
Serial.void(9600);
digitalWrite (ledPin, HIGH);
HIGH means?
LED ON
LED OFF
LED STANDBY
LED SLEEP
digitalWrite(13,LOW) means?
execute pin 13; ON
execute pin 13; OFF
turn OFF when pin is than 13 mV
turn ON when pin is more than 13 mV
What is Coding ?
A set of instructions
A group of instructions
Individual commands
All of the above
Identify this component.
Arduino Uno board
Pin Board
Breadboard
White Plastic Board
Brain
Integrated Circuit (IC)
LED
These Pins are ?
Digital Pins
Pines PWM
Analog pins
Microcontroller
What is the highlighted part
Power Regular
Drums
Voltage Regulator
Microcontroller
WHAT IS THE UNIT OF RESISTOR
FARAD
OHM
KG
NONE OF ABOVE
WHAT IS THE FUNCTION OF LED?
MULTIPLE DIRECTION CONTROL
ALLOWS THE CURRENT TO FLOW IN ONE DIRECTION ONLY
TO SLOW DOWN THE CURRENT
TO STORE THE CURRENT
In this case, the code between the curly brackets will execute ............. the conditions of the test (while ( a < 100 )) have been checked.
before
after
Upload
Verify
Coding
delay (1000);
1000 in delay is equivalent to how many second?
10s
2s
60s
1s
Which command is called repetitively as long as the Arduino has power.
loop ( )
(output)
setup ( )
(input)
Why does the LED have different length legs?
For ease of inserting into the breadboard.
To indicate which side is negative and which side is positive.
To ensure it does not easily break.
What would happen if we used the following code but the wire was not plugged into pin 13?digitalWrite(13, HIGH);delay(1000);digitalWrite(13, LOW);delay(1000);
The LED would not light up at all.
The LED would light up but be very dim.
The LED would light up as normal.
