Datasheet
5
2. Upload the following sample sketch to make the Buzzer make a beeping noise:
// Project Four - Noise maker
//
void setup()
{
pinMode(6, OUTPUT);
}
void loop()
{
digitalWrite(6, HIGH);
delay(analogRead(0));
digitalWrite(6, LOW);
delay(analogRead(0));
}
3.3 With TI LaunchPad
Playing Music (Buzzer)
This example shows how to use the Grove buzzer module to play melodies. It sends a square
wave of the appropriate frequency to the buzzer, generating the corresponding tone.










