Académique Documents
Professionnel Documents
Culture Documents
char notes[] = "agfd gfed Gaf g Caf g gaf g Caf g"; //These notes are different frequencies, each
space represents a rest
int beats[] = {16, 16, 16, 16, 3, 16, 16, 16, 16, 4, 4, 2, 2, 1, 8, 6, 4, 2, 2, 1, 8, 6, 4, 2, 2, 1, 8, 6, 4,
2, 2, 1, 8};
//These are how long each note lasts.
LiquidCrystal lcd(12,11,5,4,3,2);
//Use these digital pins.
lcd.begin(16, 2);//
for (i = 0; i < songLength; i++) //The song goes up one beat at a time.
{
duration = beats[i] * tempo; // length of note/rest in ms
int i;
const int numNotes = 9; // number of notes
char names[] = { 'c', 'd', 'e', 'f', 'g', 'a', 'b', 'C', 'G' };
int frequencies[] = {262, 294, 330, 349, 392, 440, 494, 523, 392};