wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

9 . Arduino Piano

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

What is the primary component used to produce sound in an Arduino piano project?

a)
piezo buzzer
b)
motor
c)
LED
d)
speaker
2.

Which function in Arduino is used to produce a tone on a buzzer?

a)
beep()
b)
sound()
c)
buzz()
d)
tone()
3.

What does the noTone() function do in an Arduino sketch?

a)

Increases the volume of the buzzer

b)

Changes the frequency of the buzzer

c)

Turns on the buzzer

d)

Stops the tone on the buzzer

4.

In an Arduino piano project, which component is used to detect key presses?

a)
Switch
b)
LED
c)
Resistor
d)

PushButton

5.

How do you specify the frequency of the tone produced by the buzzer in Arduino?

a)

tone(pin, frequency, duration);

b)

tone(pin, duration);

c)

tone(pin, volume);

d)

tone(pin, frequency);

6.

How can you turn off the tone on pin 8 in an Arduino sketch?

a)

offTone(8);

b)

noTone(8);

c)

stopTone(8);

d)

endTone(8);

7.

What is the purpose of using delay() in an Arduino sketch for a piano?

a)
To speed up the execution of the sketch
b)
To add random noise to the notes
c)
To change the pitch of the notes
d)

To add a pause between tones

8.

How do you connect a buzzer to an Arduino board for sound output?

a)

Connect the positive leg of the buzzer to a digital pin and the negative leg to GND

b)

Connect both legs of the buzzer to digital pins

c)

Connect the positive leg of the buzzer to GND and the negative leg to a digital pin

d)

Connect both legs of the buzzer to GND

9.

Which function is continuously executed in the Arduino loop to check button states?

a)

run()

b)

main()

c)

loop()

d)

delay()

10.

Choose the correct option which produces the sound .

a)

b)

c)

d)