Font size
WorksheetsArduino Revision 12
Total questions: 25
Worksheet time: 22mins
A program written with the IDE for Arduino is calle
Editor
Console
Sketch
IDE error
delay (1000);
1000 in delay is equivalent to how many second?
10s
2s
60s
1s
Which command is called repetitively over and over again as long as the Arduino has power.
loop ( )
(output)
setup ( )
(input)
A==7 means
A is equal to 7
7 is assigned as an int A
A is not equal to 7
A is greater than 7
What does A&&B mean
It is a logical AND operator
It is a logical OR operator
It is a multiplication operator
it is a division operator
If my function rule is y=x + 3, what is the OUTPUT if the input is 4?
4
3
7
10
The following line of code, means ________
pinMode(13, OUTPUT);
Make the device in pin 13 set to ON state.
Set the device in pin 13 as output.
Set the device in pin 13 as input.
Make the device in pin 13 set to Off state.
How many digital pin on Arduino board?
5
6
13
14
To pause a system for 2 seconds in Arduino, we use ________ line code.
delay(2);
delay(20);
delay(200);
delay(2000);
To use Serial monitor you have to write the following code
Serial.begin(9600);
True
False
Choose the correct code for line 1 to declare the arduino pin number connected to LED.
int LED = 1;
int LED = 11;
int LED = 13;
int LED = GND;
Which of the following command prints what is inside the brackets and starts a new line for the next message?
Serial.begin(9600);
Serial.print();
Serial.println();
(!Serial); (!Serial);
The _________ function defines the mode of connection for digital components.
pinMode()
PINMODE()
pinmode()
PinMode()
int x = 7;
x is an example of a/an ________________ data type in the code shown above.
character
boolean
integer
float
How can you represent 'a = a+b' using compound operators?
a++
a+b
a+=b
a=+b
choose the correct 'for - loop' syntax to decrease the brightness of LED from maximum brightness to zero. by a decrement of 20
for (int brightness = 255; brightness>=0; brightness-=20)
for (int brightness = 250; brightness>=0; brightness-=20)
for (int brightness = 200; brightness>=0; brightness-=20)
for (int brightness = 20; brightness>=0; brightness-=2)
Which of the following is an example of analogue input?
Buzzer
LED
Potentiometer
Pushbutton
The function of code in line 20 (delay(500);) is to observe the change in the brightness of the green LED for five seconds.
True
False
Arithmetic operators perform mathematical operations.
True
False
Boolean operators return either a true or false value.
True
False
Logical OR operator is represented by && symbol.
True
False
The instructions in an Arduino code are executed sequentially.
True
False
Any computer program mainly uses arithmetic, rational, boolean and compound operators.
True
False
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.
True
False
