Hi guys ! I want to play the GoT theme with my Internet Button but it won’t work ! Each sound work perfectly when I use it alone … But when I use all of them it fail, any idea ?
// This #include statement was automatically added by the Particle IDE.
#include "InternetButton/InternetButton.h"
InternetButton b = InternetButton();
void setup() {
//initiating Internet button
b.allLedsOff();
b.begin();
}
void loop() {
//for(int i=0; i<4; i++)
{
b.playSong("G4");
delay(500);
b.playSong("C4");
delay(500);
b.playSong("DS4");
delay(250);
b.playSong("F4");
delay(250);
}
for(int i=0; i<4; i++)
{
b.playSong("G4");
delay(500);
b.playSong("C4");
delay(500);
b.playSong("E4");
delay(250);
b.playSong("F4");
delay(250);
}
b.playSong("G4");
delay(500);
b.playSong("C4");
delay(500);
b.playSong("DS4");
delay(250);
b.playSong("F4");
delay(250);
b.playSong("D4");
delay(500);
for(int i=0; i<3; i++)
{
b.playSong("G3");
delay(500);
b.playSong("AS3");
delay(250);
b.playSong("C4");
delay(250);
b.playSong("D4");
delay(500);
}//
b.playSong("G3");
delay(500);
b.playSong("AS3");
delay(250);
b.playSong("C4");
delay(250);
b.playSong("D4");
delay(1000);
b.playSong("F4");
delay(1000);
b.playSong("AS3");
delay(1000);
b.playSong("DS4");
delay(250);
b.playSong("D4");
delay(250);
b.playSong("F4");
delay(1000);
b.playSong("AS3");
delay(1000);
b.playSong("DS4");
delay(250);
b.playSong("D4");
delay(250);
b.playSong("C4");
delay(500);
for(int i=0; i<3; i++)
{
b.playSong("GS3");
delay(250);
b.playSong("AS3");
delay(250);
b.playSong("C4");
delay(500);
b.playSong("F3");
delay(500);
}
b.playSong("G4");
delay(1000);
b.playSong("C4");
delay(1000);
b.playSong("DS4");
delay(250);
b.playSong("F4");
delay(250);
b.playSong("G4");
delay(1000);
b.playSong("C4");
delay(1000);
b.playSong("DS4");
delay(250);
b.playSong("F4");
delay(250);
b.playSong("D4");
delay(500);
for(int i=0; i<4; i++)
{
b.playSong("G3");
delay(500);
b.playSong("AS3");
delay(250);
b.playSong("C4");
delay(250);
b.playSong("D4");
delay(500);
}
}