Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <toneAC.h>
- #include "pitches.h"
- int noteCount=5;
- int notes []= {NOTE_C4, NOTE_GS4, NOTE_B3};
- int duration[]= {50, 75, 65};
- const int speakerPin=9;
- void setup() {
- // put your setup code here, to run once:
- Serial.begin (9600);
- }
- void loop() {
- // put your main code here, to run repeatedly:
- for (int i=0; i< noteCount; i++)
- {
- tone(speakerPin,notes[i], duration [i]);
- }
- while (1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement