Piezo Buzzer - NoahMacDonald1/387_NM_Final GitHub Wiki

Perhaps the most simple part of my project, I've added a piezo buzzer to beep based on the following conditions:

  1. When a pattern button is pressed. Note that the frequencies vary based on which button is pressed.
  2. When the pattern is correct.
  3. When the pattern is incorrect.

Video can be found here (same video as the LED)

When the 2nd and 3rd events happen, the speaker beeps 3 times. The speaker is connected to digital pin 11, and has a 330 Ohm resistor connected as well. All sounds are controlled by the tone() function.

Piezo speaker