So I'm new here and kind of stupid. So I am trying to make a karaoke machine for school and part of it is making the words appear on the lcd display. I am trying to use the autoscroll function but for whatever reason I'm getting an error message that says "expected unqualified id" any suggestions? all help is greatly appreciated.
Here is my code:
const int buzzerPin = 9; //pin 9
const int songLength = 26;
char notes[] = "eeeeeeegcdefffffeeeeeddedg"; //notes
int beats[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; //length of each note
int tempo = 150; //how fast to play song (faster=lower #)
char* lyrics[] = {"jin", "gle", "bells", "jin", "gle", "bells", "jin", "gle", "all", "the", "way", "oh", "wat", "fun", "it", "is", "to", "ride", "in", "a", "one", "horse", "op", "en", "sleigh", "HEY"};
#include <LiquidCrystal.h>
LiquidCrystal lcd(12,11,5,4,3,2);
void setup()
{
pinMode(9, OUTPUT);
lcd.begin(16, 2);
lcd.clear();
}
void loop()
{
lcd.setCursor(0,0);
for (int thisChar = 0; thisChar < 10; thisChar++) {
lcd.print(thisChar);
delay(500);
}
lcd.setCursor(16,1);
lcd.autoscroll();
for (int thisChar = 0; thisChar < 10; thisChar++) {
lcd.print(thisChar);
delay(500);
}
lcd.noAutoscroll();
lcd.clear();
}
{
int i, duration;
for(int i=0; i < songLength; i++);
{
duration = beats * tempo;
_ if (notes*==' ')_
_ {_
_ delay(duration);_
_ }_
_ else*_
* {*
_ tone(buzzerPin, (notes*), duration);
delay(duration);
}
delay(tempo/10);
}
while(true){}
}
int frequency(char note)
{
int i;
const int numNotes = 8;
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++)
{
if (names == note)
{_
_return(frequencies);
}
}
return(0);
}*_