wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Arduino Signals and Programming Quiz

Total questions: 24

Worksheet time: 12mins

Name
Class
Date
1.

Which technique does Arduino use to generate analogue signals?

a)

Pulse width modulation (PWM)

b)

Amplitude modulation

c)

Frequency modulation

d)

Square wave modulation

2.

Which value corresponds to a 100% duty cycle in PWM?

a)

255

b)

200

c)

500

d)

128

3.

What programming language does Arduino use for sketch development?

a)

Java

b)

JavaScript

c)

Python

d)

C/C++

4.

Which function is required to establish a serial communication with the Arduino board?

a)

Serial.begin(9600);

b)

Serial.init(9600);

c)

Serial.start(9600);

d)

Serial.send(9600);

5.

In which part of the Arduino code should Serial.begin be written?

a)

void setup():

b)

void main():

c)

void loop():

d)

void start():

6.

What does the statement Serial.println(…); do in Arduino?

a)

It converts data to a string.

b)

It initializes the serial communication.

c)

It sends data without starting a new line.

d)

It sends data and moves to a new line on the display.

7.

What is the output of Serial.println(5+1); on the monitor?

a)

5

b)

1

c)

5+1

d)

6

8.

Which statement accurately defines a variable in programming?

a)

A temporary placeholder for function results.

b)

A memory storage unit where data is kept.

c)

A permanent storage location in memory.

d)

A type of data structure in arrays.

9.

What data type would 0.5 be classified as?

a)

char

b)

bool

c)

float

d)

int

10.

What will be the output when executing Serial.print("5+1");?

a)

The literal string 5+1

b)

5 + 1

c)

6

d)

The number 5 and then 1

11.

Which of the following is NOT a variable type in Arduino?

a)

integer

b)

char

c)

string

d)

float

12.

In Arduino programming, what is the purpose of a semicolon?

a)

To end a statement.

b)

To start a block of code.

c)

To comment a line.

d)

To declare variables.

13.

What will be the output for Serial.println("5+1");?

a)

6

b)

Error in syntax

c)

5+1

d)

5 + 1

14.

What role does the Arduino IDE play in relation to the Arduino hardware?

a)

It provides a physical interface for the hardware.

b)

It is a programming interface for writing code.

c)

It functions as an input device.

d)

It serves as a power source for the board.

15.

Which of the following components is classified as an output device?

a)

Light

b)

Sensor

c)

Motor (Wheel)

d)

Button

16.

What type of Arduino board is indicated as being used in school?

a)

Arduino Nano

b)

Arduino Mega

c)

Arduino Leonardo

d)

Arduino Uno

17.

Which of the following describes the Arduino UNO?

a)

An advanced version of the Arduino Mega.

b)

A board that can run Java applications.

c)

A component that is only useful for advanced programming.

d)

A microcontroller board used for various projects.

18.

What is a primary function of the serial monitor in Arduino?

a)

To simulate hardware components.

b)

To send and receive data between the computer and Arduino.

c)

To communicate with output devices only.

d)

To upload code to the board.

19.

How do you declare an integer variable named 'num' and assign the value 5 to it?

a)

num int = 5;

b)

integer num = 5;

c)

int num: 5;

d)

int num = 5;

20.

What is the correct way to declare a boolean variable called 'result' and assign it the value true?

a)

bool result = true;

b)

bool result: true;

c)

boolean result = true;

d)

result bool = true;

21.

Which line correctly declares a char variable called 'letter' and assigns it the character 'a'?

a)

char letter = 'a';

b)

letter char = 'a';

c)

char letter = a;

d)

char letter: 'a';

22.

Which of the following correctly declares a float variable called 'grade_11' and assigns it the value 90.5?

a)

float grade_11: 90.5;

b)

float grade_11 = 90.5;

c)

grade_11 float = 90.5;

d)

float grade_11 = 90;

23.

What is the correct way to declare multiple variables of different types in one statement?

a)

int num, bool result;

b)

int num; bool result;

c)

num int; result bool;

d)

result bool, num int;

24.

Which option correctly shows the sequence of declaring an integer, a boolean, and a char variable?

a)

char letter; bool result; int num;

b)

num int; result bool; letter char;

c)

float grade; int num; char letter;

d)

int num; bool result; char letter;