Go Down

Topic: LED with Music Notes (Read 2 times) previous topic - next topic

PaulS

Quote
Try putting these lines in order:

Is step 4 really necessary? That will REALLY slow the song down.

kculm

John,

I am not copping out, I am just not getting it.

I sure you have better things to do, but you get some free time do you think you can set it up on a breadboard and see what I see.  Like I said I am sure you have better things to do.

I am not sure what you mean when you say "Try putting these lines in order".

I am very thankful for your time and help.


PaulS

Quote
I am not sure what you mean when you say "Try putting these lines in order".

Did you look at the comments on those 4 lines John posted?

johncc


...I am not sure what you mean when you say "Try putting these lines in order"....


Please stare at the following until you understand what "put in order" means :)

Code: [Select]

???????? ?????? (?????????? [i], ??????? [i] * ????????)?  // 2) ????? ?? ???????? ??? ?? ??????
       ???????? ???????? (??????? ??? [i], HIGH)?          // 1) ??? ?? ????? ??? ??? ????????? LED
       ??????????? (100)?                                  // 4) 100 ???????? ??? ????????????? ???????????
       ???????? ???????? (??????? ??? [i], LOW)?           // 3) ?? ????? ??? LED

kculm

Ok Is this what you mean. I hope. If not I am going to feel like a real Dumb A%#.


Code: [Select]
digitalWrite(ledPins[i], HIGH);
      playNote(notes[i], beats[i] * tempo);
      digitalWrite(ledPins[i], LOW); 
      delay (100);

Go Up