Error; Excpected ')' numeric constant

Could someon be telling me what the error is because i cant seem to find it anywhere.

The errors: /tmp/299805846/Led_settup/Led_settup.ino: In function ‘void TimeChecks()’:

/tmp/299805846/Led_settup/Led_settup.ino:25:24: error: expected ‘)’ before numeric constant

/tmp/299805846/Led_settup/Led_settup.ino:29:19: error: ‘ActivatingLeds’ was not declared in this scope

/tmp/299805846/Led_settup/Led_settup.ino:32:29: error: expected ‘)’ before numeric constant

int led1 = 1;
int led2 = 2;
int led3 = 3;
int led4 = 4;
int led5 = 5;

int TimeElapsed = 0;

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

void loop()
{
TimeChecks();
}

void TimeChecks(){

if (TimeElapsed < 43 200 000)
{
int TimeElapsed = TimeElapsed + 1;
delay(1000);
ActivatingLeds();
}

else if(TimeElapsed >= 43 200 000 && TimeElapsed < 43 200 000*2)
{
int TimeElapsed = TimeElapsed + 1;
delay(1000);
ShuttingLedsDown();
}

else
{
TimeElapsed = 0;
}
}

void Activatingleds()
{

digitalWrite(led1, HIGH);
digitalWrite(led2, HIGH);
digitalWrite(led3, HIGH);
digitalWrite(led4, HIGH);
digitalWrite(led5, HIGH);

}

void ShuttingLedsDown()
{

digitalWrite(led1, HIGH);
digitalWrite(led2, HIGH);
digitalWrite(led3, HIGH);
digitalWrite(led4, HIGH);
digitalWrite(led5, HIGH);
}

ActivatingLeds() is not the same as Activatingleds()

Can whitespace be used as a digit separator?

Every time you do this int TimeElapsed you create a new variable called TimeElapsed

the first error i saw myself couple minutes after but thanks for helping me with time elapsed thing

the first error i saw myself couple minutes after but thanks for helping me with time elapsed thing. still have the other errors even though i took away the int :cry:

Post your latest code. Did you take care of both errors in reply #1?

evanmars:
Can whitespace be used as a digit separator?

Those 43 200 000 should be 43200000

Here is a version that compiles:

int led1 = 1;
int led2 = 2;
int led3 = 3;
int led4 = 4;
int led5 = 5;

int TimeElapsed = 0;

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

void loop()
{
  TimeChecks();
}


void TimeChecks() {

  if (TimeElapsed < 43200000)
  {
    TimeElapsed = TimeElapsed + 1;
    delay(1000);
    ActivatingLeds();
  }
  else if (TimeElapsed >= 43200000 && TimeElapsed < 43200000 * 2)
  {
    TimeElapsed = TimeElapsed + 1;
    delay(1000);
    ShuttingLedsDown();
  }
  else TimeElapsed = 0;
}

void ActivatingLeds()
{
  digitalWrite(led1, HIGH);
  digitalWrite(led2, HIGH);
  digitalWrite(led3, HIGH);
  digitalWrite(led4, HIGH);
  digitalWrite(led5, HIGH);
}

void ShuttingLedsDown()
{
  digitalWrite(led1, HIGH);
  digitalWrite(led2, HIGH);
  digitalWrite(led3, HIGH);
  digitalWrite(led4, HIGH);
  digitalWrite(led5, HIGH);
}

You should consider using an array for the led pin numbers.

int leds[] = {1,2,3,4,5};

and

for (byte i=0;i<5;i++) pinMode(leds[i], OUTPUT);

and so on...