Error: expected primary-expression before ')' token. Project Binary Counter

Hi everyone, what do I do wrong here that I get this error message?
Its my first real project and what I wanted to do is declare a delay variable with the name pause that is half a second long.

Thanks in advance!

// C++ code
//Binary Counter

//Variablen

int led1 =  3;
int led2 =  7;
int led3 =  10;
int led4 =  13;
int pause = 500;


void setup()
{
  pinMode(led1, OUTPUT);
  pinMode(led2, OUTPUT);
  pinMode(led3, OUTPUT);
  pinMode(led4, OUTPUT);
}

void loop()
{ 
  digitalWrite(led1, LOW); //0000
  digitalWrite(led2, LOW);
  digitalWrite(led3, LOW);
  digitalWrite(led4, LOW);
  
  delay(pause,);
}

Your delay has a superfluous comma.

1 Like

Thank you omg :slight_smile:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.