"'serial' not declared in this scope" error I'm trying to make a basic potentiometer with a startup kit using the following code:

const float referenceVolts = 5.0;
const int batteryPin = 0;

void setup()  {
  serial.begin(9600);
}

void loop()  {
  int val = analogRead(batteryPin);
  float volts = (val / 1023.0) * referenceVolts;
  Serial.println(volts);
}


It worked on one computer, however on my primary laptop it refuses to work and displays an error message "'serial' not declared in this scope". Can anyone recommend a solution?
Serial must be UPPERCASE as this class is case sensitive

Therefore your code will be:

const float referenceVolts = 5.0;
const int batteryPin = 0;

void setup()  {
Serial.begin(9600);
}

void loop()  {
int val = analogRead(batteryPin);
float volts = (val / 1023.0) * referenceVolts;
Serial.println(volts);
}