kculm:
Ok I fixed the issuse with it starting late..The code wasint ledPins[] = {0,1,2,3,4,5,6,7,8,9};
and Now
int ledPins[] = {2,3,4,5,6,7,8,9};
Great!
I still get way it stops the lights 8 notes in tho.
If this means "I still don't why it stops after 8 notes though"....
Here is the problem
else {
// here, i is counting from 0 to 41
digitalWrite(ledPins[i], HIGH); // but there are only 9 ledPins!
playNote(notes[i], beats[i] * tempo);
digitalWrite(ledPins[i], LOW);
delay (100);
}
but
for (int i = 0; i < 8; i++) {
if (names[i] == note) {
// Here i, represents the note that was found, between 0 and 7 inclusive
playTone(tones[i], duration);
}
See if you can figure out how to fix this. If not I will post the solution tonight...
Cheers,
John