tech guy
Published

Tone Gadget

This is a project about how to play tones with a buzzer and an Arduino.

BeginnerShowcase (no instructions)15 minutes573
Tone Gadget

Things used in this project

Story

Read more

Schematics

buzzer description

Code

Untitled file

Arduino
int b = 9; //create buzzer object and label it as b
void setup() { // setup code, to run once
  pinMode(b, OUTPUT); //tell the arduino to output signal to the buzzer
}// end setup code
void loop() { //loop that will run repeatedly
  tone(b, 400, 1000); //play a tone
  delay(700); //wait 700 miliseconds
  tone(b, 600, 1000);
  delay(700);
  tone(b, 800, 1000);
  delay(700);
  tone(b, 600, 1000);
  delay(700);
  tone(b, 400, 1000);
  delay(700);
}

Credits

tech guy
7 projects • 9 followers
Contact

Comments

Please log in or sign up to comment.