Hey!
I can't get any swtich/case statements working.
Here's mine:
swtich (switchState)
{
case 0:
if (menuItem == 1)
{menuItem= 5;}
else
{menuItem--;}
break;
case 1:
(if menuItem == 5)
{menuItem=0;}
else
{menuItem++;}
break;
case 3:
menuItem=6:
break;
}
all the variables are ints, and are defined ect. I get the error:
error: 'swtich' was not declared in this scope
So, i copied and pasted the example from Arduino.cc:
int var = 1;
switch (var) {
case 1:
//do something when var == 1
break;
// break is optional
case 2:
//do something when var == 2
break;
default:
// if nothing else matches, do the default
// default is optional
}
and i get the error:
error: expected unqualified-id before 'switch'
What the devil am i doing wrong?
Cheers!
Nick D