AWOL:
byte getvalue ()
{
const byte returnVal [32] = {3, 6, 9, 13, 16, 19, 22, 25, 28, 31, 34, 38, 41, 44, 47,
50, 53, 56, ...etc };
int index = (digitalRead (DS_L)<<4) | (digitalRead (DS_ML)<<3) | (digitalRead (DS_M)<< 2) | (digitalRead (DS_MR)<< 1) | digitalRead (DS_R);
return returnVal [index];
}
Why write seven lines, when you can write the same thing in 140?
Or return map(index, 0, 31, 3, 100);