Skip to main content
case typo: HiGH was written with lower case I
Source Link

There are indeed some errors.

First, you cannot assign a function body to a variable.

So you have to rewrite the Blink function:

void blink()
{
    digitalWrite(led, HiGHHIGH);   
    delay(1000);
    digitalWrite(led, LOW);
    delay(1000);
}

Also for calling a function, even without parameters, you should use ( and ):

void loop()
{
    blink();
}

Also you need to use the correct capitals or not:

int led = 13;

You can make it constant since it does not change:

static const int led = 13;

So all together you get:

static const int led = 13;

void setup()
{
    pinMode(led, OUTPUT);
}

void loop()
{
    blink();
}

void blink()
{
    digitalWrite(led, HiGHHIGH);   
    delay(1000);
    digitalWrite(led, LOW);
    delay(1000);
}

I suggest you read a book about C or C++ to get used to the syntax.

Also, note that int is written as int, not Int. Case matters.

There are indeed some errors.

First, you cannot assign a function body to a variable.

So you have to rewrite the Blink function:

void blink()
{
    digitalWrite(led, HiGH);   
    delay(1000);
    digitalWrite(led, LOW);
    delay(1000);
}

Also for calling a function, even without parameters, you should use ( and ):

void loop()
{
    blink();
}

Also you need to use the correct capitals or not:

int led = 13;

You can make it constant since it does not change:

static const int led = 13;

So all together you get:

static const int led = 13;

void setup()
{
    pinMode(led, OUTPUT);
}

void loop()
{
    blink();
}

void blink()
{
    digitalWrite(led, HiGH);   
    delay(1000);
    digitalWrite(led, LOW);
    delay(1000);
}

I suggest you read a book about C or C++ to get used to the syntax.

There are indeed some errors.

First, you cannot assign a function body to a variable.

So you have to rewrite the Blink function:

void blink()
{
    digitalWrite(led, HIGH);   
    delay(1000);
    digitalWrite(led, LOW);
    delay(1000);
}

Also for calling a function, even without parameters, you should use ( and ):

void loop()
{
    blink();
}

Also you need to use the correct capitals or not:

int led = 13;

You can make it constant since it does not change:

static const int led = 13;

So all together you get:

static const int led = 13;

void setup()
{
    pinMode(led, OUTPUT);
}

void loop()
{
    blink();
}

void blink()
{
    digitalWrite(led, HIGH);   
    delay(1000);
    digitalWrite(led, LOW);
    delay(1000);
}

I suggest you read a book about C or C++ to get used to the syntax.

Also, note that int is written as int, not Int. Case matters.

Source Link
Michel Keijzers
  • 13k
  • 7
  • 42
  • 59

There are indeed some errors.

First, you cannot assign a function body to a variable.

So you have to rewrite the Blink function:

void blink()
{
    digitalWrite(led, HiGH);   
    delay(1000);
    digitalWrite(led, LOW);
    delay(1000);
}

Also for calling a function, even without parameters, you should use ( and ):

void loop()
{
    blink();
}

Also you need to use the correct capitals or not:

int led = 13;

You can make it constant since it does not change:

static const int led = 13;

So all together you get:

static const int led = 13;

void setup()
{
    pinMode(led, OUTPUT);
}

void loop()
{
    blink();
}

void blink()
{
    digitalWrite(led, HiGH);   
    delay(1000);
    digitalWrite(led, LOW);
    delay(1000);
}

I suggest you read a book about C or C++ to get used to the syntax.