int pitch[]={0,262,277,294,311,330,349,370,392,415,440,466,494,523,554,587,662,659,698,740,784,831,880,932,988,1175};
int music[]={18,0,18,0,18,0,18,0};
float dur[]={0.35,0.15,0.35,0.15,0.35,0.15,0.35,0.15};
int duration=115; //260 on arduino, wokwi sucks
void setup() {
// put your setup code here, to run once:
pinMode(15,OUTPUT);
for(int i=0;i<=sizeof(music)/sizeof(int);i++){
tone(15,pitch[music[i]],duration*dur[i]);
}
}
void loop() {
// put your main code here, to run repeatedly:
}