Paso 3:
Siguiente copia lo siguiente:
#include "pitches.h"
melodía de int [] = {}
NOTE_E3, NOTE_E4, NOTE_D4, NOTE_E4, NOTE_G4, NOTE_D4, NOTE_B4, NOTE_A4, NOTE_G4, NOTE_D4, NOTE_D4, NOTE_C4, NOTE_B3, NOTE_G3, NOTE_E3, NOTE_D3, NOTE_E3, NOTE_E5, NOTE_E5, NOTE_E5, NOTE_E5, NOTE_B4, NOTE_G4, NOTE_E4, NOTE_D5,
NOTE_E4, NOTE_D4, NOTE_E4, NOTE_G4, NOTE_D4, NOTE_B4, NOTE_A4, NOTE_G4, NOTE_D4, NOTE_D4, NOTE_C4, NOTE_B3, NOTE_G3, NOTE_E3, NOTE_D3, NOTE_E3, NOTE_E5, NOTE_E5, NOTE_E5, NOTE_E5, NOTE_B4, NOTE_G4, NOTE_E4, NOTE_D5,
NOTE_G3, NOTE_G3, NOTE_G3, NOTE_D4, NOTE_B3, NOTE_B3, NOTE_B3, NOTE_B3, NOTE_G3, NOTE_A3, NOTE_B3, NOTE_D4, NOTE_B3, NOTE_G3, NOTE_G3, NOTE_G3, NOTE_D4, NOTE_G3, NOTE_G3, NOTE_G3, NOTE_G3, NOTE_G3, NOTE_G3, NOTE_G3, NOTE_A3, NOTE_G3, NOTE_FS3, NOTE_E3,
NOTE_G3, NOTE_G3, NOTE_G3, NOTE_D4, NOTE_B3, NOTE_B3, NOTE_B3, NOTE_B3, NOTE_G3, NOTE_A3, NOTE_B3, NOTE_D4, NOTE_B3, NOTE_G3, NOTE_G3, NOTE_G3, NOTE_D4, NOTE_G3, NOTE_G3, NOTE_G3, NOTE_G3, NOTE_G3, NOTE_G3, NOTE_G3, NOTE_A3, NOTE_G3, NOTE_G3, NOTE_G3, NOTE_G3, 0,
NOTE_E1, NOTE_A2, NOTE_E1, NOTE_E1, NOTE_E1, NOTE_E1,
NOTE_E1, NOTE_A2, NOTE_E1, NOTE_E1, NOTE_E1, NOTE_E1,
};
int noteDurations [] = {}
6,6,6,6,3,6,6,6,6,3,6,6,6,6,6,6,6,6,6,6,6,6,6,6,2,
6,6,6,3,6,6,6,6,3,6,6,6,6,6,6,6,6,6,6,6,6,6,6,2,
6,6,6,2,2,6,6,6,6,8,8,8,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,
6,6,6,2,2,6,6,6,6,8,8,8,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,2,2,
1,2,4,4,1,1,
1,2,4,4,1,1,
};
void setup() {}
para (int thisNote = 0; thisNote < 120; thisNote ++) {}
int noteDuration = 1000/noteDurations [thisNote];
tono (11, melody[thisNote],noteDuration);
int pauseBetweenNotes = noteDuration * 1.30;
Delay(pauseBetweenNotes);
noTone(11);
}
}
void loop() {}
}
y péguelo en el software de Arduino.