wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Arduino practice 2

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

Look at the image. The right code is:

a)

int sensorValue = analogRead(A0);

b)

int sensorValue = analogRead(A4);

c)

digitalWrite(2, HIGH);

d)

analogWrite(ledPin, HIGH);

2.

Look at the image. The right code is:

a)

int sensorValue = analogRead(A0);

b)

int sensorValue = analogRead(A4);

c)

digitalWrite(ledPin, HIGH);

d)

analogWrite(ledPin, HIGH);

3.

Look at the image. The right code is

a)

int sensorValue = analogRead(A0);

b)

digitalRead(8, HIGH);

c)

digitalWrite(8, LOW);

d)

analogWrite(ledPin, HIGH);

4.

Look at the image, the code:

int sensorValue = analogRead(A0);

Serial.println(sensorValue);

will print on screen:

a)

5

b)

1023

c)

0

d)

1024

5.

Look at the image, the code:

int sensorValue = analogRead(A0);

float voltage = sensorValue * (5.0 / 1023.0);

Serial.println(voltage);

will print on screen:

a)

5

b)

1023

c)

0

d)

1024

6.

Look at the image. A part of the code for this circuit is: (2 answers)

a)

pinMode(9, INPUT)

b)

pinMode(4, OUTPUT)

c)

pinMode(4, INPUT)

d)

pinMode(9, OUTPUT)

7.

Look at the image. A pinMode instruction is likely to be in:

a)

the comments

b)

the loop

c)

the setup

8.

Look at the image. The sensor depicted is:

a)

An ultrasonic sensor

b)

A passive infrared sensor

c)

A LDR sensor

d)

A temperature sensor

9.

Look at the image. The sensor depicted is:

a)

An ultrasonic sensor

b)

A passive infrared sensor

c)

A LDR sensor

d)

A temperature sensor

10.

Look at the image. The sensor depicted is:

a)

An ultrasonic sensor

b)

A passive infrared sensor

c)

A LDR sensor

d)

A temperature sensor

11.

An LDR (Light Dependant Resistor) detects changes in:

a)

Motion

b)

Light

c)

Sound

d)

Temperature

12.

Look at the image. The output is:

a)

Ultrasonic sensor

b)

Passive infrared sensor

c)

LDR

d)

LED

e)

Arduino

13.

Look at the image. The input is:

a)

Ultrasonic sensor

b)

Passive infrared sensor

c)

LDR

d)

LED

e)

Arduino

14.

Look at the image. The control block is:

a)

Ultrasonic sensor

b)

Passive infrared sensor

c)

LDR

d)

LED

e)

Arduino

15.

Look at the image. The input is:

a)

Ultrasonic sensor

b)

Passive infrared sensor

c)

Potentiometer

d)

LED

e)

Arduino