SIK_circuit11_buzzer by SparkFun SIK Examples

This sketch uses the buzzer to play songs. The Arduino's tone() command will play a square wave of a given frequency.

This sketch uses the tone() command to play notes.

Usage:

tone([pin], [frequency]);

note \ frequency

c   262 Hz

d   294 Hz

e   330 Hz

f   349 Hz

g   392 Hz

a   440 Hz

b   494 Hz

C   523 Hz

Other useful commands:

noTone([pin]); 

and,

delay([time_ms]);

For more information, see http://arduino.cc/en/Tutorial/Tone

Wiring Diagram

enter link description here

Embed This Sketch

Use the following HTML code to embed the sketch code above in your blog or website.

<iframe style="height: 510px; width: 100%; margin: 10px 0 10px;" allowTransparency="true" src="https://codebender.cc/embed/sketch:77059" frameborder="0"></iframe>

Embed The Serial Monitor

You can also embed the Serial Monitor section! Just use this HTML code.

<iframe style="height: 510px; width: 100%; margin: 10px 0 10px;" allowTransparency="true" src="https://codebender.cc/embed/serialmonitor" frameborder="0"></iframe>