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.
loop()
does nothing butblink()
, there is no simplification in definingblink()
as a separate function.