Sorry, updated code is;
int buffer[10];
if (Serial.available()) {
int x = Serial.readBytesUntil('\r', buffer, 9);
buffer[x] = '\0';
}
int y = atoi (buffer);
Serial.println("recieved rpm ");
Serial.println(y);
error is now.....
no matching function for call to 'HardwareSerial::readBytesUntil(char, int [10], int)'
and what is this line doing??
buffer[x] = '\0';