Hi, I am doing the Arduino switch case. As you can see below, the one which asked to compare valGSide if it is equal to 5, or not seem to work fine but in the case that I want to compare it to 5, when it is less than, or more than 5, I tried to put >, and < but it seems not working. What should I change in this code. Thank You!
switch (valGSide)
{
case 5:
valWL= 9;
valWR= 9;
break;
case < 5:
valWR =9;
valWL = 9-(valGSide*2);
break;
case > 5:
valWL =9;
valWR = 9-(valGSide*2);
break;
}
Examples of error message:
Receiver_Final:43: error: expected primary-expression before '<' token
Receiver_Final:47: error: expected primary-expression before '>' token