You are on page 1of 3

Yvonne C.

Yee
CPE317- 3C
CEDD

CIRCUIT DESIGN:
QUESTIONS:

1. Explain the function of the piezo buzzer in the given scenario.


Answer: A piezo buzzer is basically a small speaker that connects
directly to the Arduino. It is a type of electric device that is used to
produced a sounds or tone
2. Try to replace the 1k ohms resistor to 100 ohms. Explain what you
have observe in the LED and the piezo.
Answer: The tone of piezo buzzer increases as the resistor changed to
100 ohms compared to 1k ohms and also all the LED lights brighter
with 100 ohms.

2. Try to replace the 1k ohms resistor to 10k ohms. Explain what you
have observe in the LED and the piezo.
Answer: All LED lights up brighter with 1k ohms than the 2 previous
resistors and also the tone of piezo buzzer decreases.

3. How does the resistor affect the LED and Piezo buzzer?
Answer: The resistor is to limit the current flow through the LED. A
LED will burn itself out if given too much current. While a resistor in
front of the piezo buzzer won’t do much of anything. It only blocks a
short or a tiny bit of the sound and won’t change at all.
SOURCE CODE:
// C++ code

//

void setup()

pinMode(2, OUTPUT);//Green LED light

pinMode(3, OUTPUT); //Yellow LED light

pinMode(4, OUTPUT); //Red LED light

void loop()

digitalWrite(4, HIGH);//Turn on Red LED

delay(5000); // 5 seconds of waiting

digitalWrite(4, LOW); //Turn off Red LED

digitalWrite(3, HIGH);//Turn on Yellow LED

delay(5000); // 5 seconds of waiting

digitalWrite(3, LOW); //Turn off Yellow LED

digitalWrite(2, HIGH);//Turn on Green LED

delay(5000); // 5 seconds of waiting

digitalWrite(2, LOW); //Turn off Green LED

You might also like