Hello, i have to say i'm a total newbie on arduino and try to work on my first project. My project does need a large use of the
switch (var){}
function. Acutally i have 50 "case" to try, each case wil result in a number from -1000 to 1000.
My question is, do i need to write it all the time or is there a better way to solve it?
I'm familiar with php and instead of switch i can do something like this:
$var=array("100","200","300");
echo $var[1]; //prints 100
echo $var[2]; //prints 200
So i don't have to write 50 times "case and break".
Can arduino do something similar?
Thanks for your help!