Old code for Uno needs updating

try

void sendValue (int x){              // function to send the pin value followed by a "space". 
 Serial.print(x);
 Serial.print(' '); 
}

who's Max?