Ive been trying some of the beginner projects for the UNO, and I've run into an issue.
It's with the LCD. Ive double checked to make sure the wiring is correct (and im triple checking once this is posted), but I keep getting the following error:
exit status 1
'swithState' was not declared in this scope
I'm good with C# but have no experience with C and C++, so some help would be appreciated!
Forgive me, for am noob.
Source:
#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4 ,3, 2);
//Include lcd libraries, init pins
const int switchPin = 6;
int switchState = 0;
int prevSwitchState = 0;
int reply;
void setup() {
lcd.begin(16, 2);
pinMode(switchPin,INPUT);
lcd.print("Ask the");
lcd.setCursor(0, 1);
lcd.print("Lqd Crystal!");
}
void loop() {
swithState = digitalRead(switchPin);
if (switchState != pevSwitchState) {
if (switchState == LOW) {
replay random(8);
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("LCB says..");
delay(1552);
switch(reply){
case 0;
lcd.print("Probably?");
break;
case 1;
lcd.print("Dont.");
break;
case 2;
lcd.print("Yes!")
break;
case 3;
lcd.print("R U N");
break;
case 4;
lcd.print("Unclear...");
break;
case 5;
lcd.print("Mayhabps!");
break;
case 6;
lcd.print("NO. NO.");
break;
case 7;
lcd.print("e926.net");
break;
}
}
}
prevSwitchState = switchState;
}