Hello everyone, I'm new to robotics and i'm trying to write a line follower robot code using switch case
The problem comes with case statement. That is if i use 3 line sensors, i get 3 inputs. So how can i write switch case for different cases? Like..
Before going ahead, the code i have tried for testing:
int s; //2 sensors
digitalWrite(13, LOW);//led connected to pin 13
But it shows the error : expected primary expression before ']' token.
Looks like the switch statement doesn't take array.
Is there a way to do with switch case or it's not possible? How to combine all the inputs from sensors and put it in switch statement?
I hope i have expressed properly. Any help would be appreciated.
Sorry for my bad english