Please Help Me...I'm getting an error on my code
too many arguments to function 'int function(char)'
//Buzzer
const int buzzerPin = 9; //Pulse Width Modulation, PWM
const int songLength = 18;
char notes[] = "cdfda ag cdfdg gf";
int beats[] = {1,1,1,1,1,1,4,4,2,1,1,1,1,1,1,4,4,2};
int tempo = 150;
void setup()
{
pinMode(9,OUTPUT);
}
void loop()
{
int i; //arbituary integer
int duration; //in milliseconds
for (i=0; i< songLength; i++) //counts up from 0 until it reaches song length
{
duration = beats_*tempo; //length of note and rests in notation_
_ if (notes == ' ') //this signifies a rest in the music_
* {*
* delay(duration); //*
* }*
* else*
* {*
_ tone(9, frequency(notes*, duration);
delay(duration);
}
delay(tempo/10);
}*_
while(true) {} //this prevents an Infinite Loop
}
int frequency(char note)
{
* int i;*
* const int numNotes = 8; //number of notes stored*
* char names[] = {'c','d','e','f','g','a','b','C'};*
* int frequencies[] = {262,294,330,349,392,440,494,523};*
* for(i=0; i<numNotes; i++) //step through the notes*
* {*
_ if (names == note)
* {
return(frequencies);
}
}
return(0); //this prevents an Infinite Loop*
}_