Play a basic tone with a Seeeduino Xiao

Description: A piezo buzzer connected to the Ground (GND) and D9 pins on the Seeeduino Xiao plays a basic tone in G.

Basic Tone with Seeeduino Xiao

Supplies:

1 –  Breadboard 400 Points
1 – Seeeduino Xiao
1 – Piezo Buzzer

Arduino Code:

const int speaker = 9;

void setup() {

  pinMode(speaker, OUTPUT);

}

void loop() {

  tone(speaker, 277); // Send 277KHz sound signal, which is a G tone
  delay(1000);
  noTone(speaker); // Stop sound
  delay(1000);

}

Leave a Comment

75 − = 74