Happybirthday Song With Arduino and a Piezo Buzzer

1,060

3

2

Posted

Introduction: Happybirthday Song With Arduino and a Piezo Buzzer

This is a easy and simple project( My frist one). It is only a buzzer that plays the Happybirthday songs in the fourth octave.

Step 1: Elements Set Up

You`ll need the folllowing materials:

-An Arduino uno R3 board

-A piezzo (buzzer)

-A 1k resistance

-Some wires

-USB A-B cable to connect arduino to a pc

-A breadboard

When you get all components, you have the half of the work done.

Now put the piezzo on the breadbord and connect the positive to the digital pin 11, and the negative to the resistance. Then connect the resistance to the ground pin.

Plug the arduino board to the pc and send the code that I hive you to the board.

Press the reset botton and You got it !!!!

https://mega.nz/#F!eN1kULTC!eQFrcn485TxdXwUpl4JIxg

void setup() {
tone(11, 391.995, 500); // en el pin 11, sol delay(800); tone(11, 391.995, 500); // en el pin 11, sol delay(800); tone(11, 440.000, 500); // en el pin 11, la delay(800); tone(11, 391.995, 500); // en el pin 11, sol delay(800); tone(11, 277.183, 500); // en el pin 11, do# delay(800); tone(11, 493.883, 500); // en el pin 11, si delay(1500);

tone(11, 391.995, 500); // en el pin 11, sol delay(800); tone(11, 391.995, 500); // en el pin 11, sol delay(800); tone(11, 440.000, 500); // en el pin 11, la delay(800); tone(11, 391.995, 500); // en el pin 11, sol delay(800); tone(11, 311.127, 500); // en el pin 11, re# delay(800); tone(11, 277.183, 500); // en el pin 11, do# delay(1500);

tone(11, 391.995, 500); // en el pin 11, sol delay(800); tone(11, 391.995, 500); // en el pin 11, sol delay(800); tone(11, 329.628, 500); // en el pin 11, mi# delay(800); tone(11, 277.183, 500); // en el pin 11, do# delay(800); tone(11, 493.883, 500); // en el pin 11, si delay(800); tone(11, 440.000, 500); // en el pin 11, la delay(800); tone(11, 391.995, 1000); // en el pin 11, sol delay(1500);

tone(11, 349.228, 500); // en el pin 11, fa delay(800); tone(11, 349.228, 500); // en el pin 11, fa delay(800); tone(11, 329.628, 500); // en el pin 11, mi delay(800); tone(11, 277.183, 500); // en el pin 11, do# delay(800); tone(11, 311.127, 500); // en el pin 11, re# delay(800); tone(11, 277.183, 1000); // en el pin 11, do# delay(800);

}

Share

    Recommendations

    • Science of Cooking

      Science of Cooking
    • Microcontroller Contest

      Microcontroller Contest
    • Spotless Contest

      Spotless Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    2 Comments

    Si alguien quiere podeis preguntar en castellano¡¡¡