blinking Error


i get this error when i try to upload to my board.

error: ‘Blinking’ does not name a typeBad error line: -2


Example 01 : Blinking LED

#define LED 13 // LED conneted to
// digital pin 13

void setup ()
pinMode(LED, OUTPUT); // sets the digtal
// pin as output

void loop ()
digitalWrite(LED, HIGH); //Turns the LED on
delay(1000); //waits for a second
digitalWrite(LED, LOW); //Turns the LED off
delay(1000); //waits for a second

i hope there is som people there will help me :slight_smile:


Example 01 : Blinking LED

isn't part of your program. Remove it.

BTW, this isn't a hardware problem.

Or change it to
// Example 01 : Blinking LED

if a remove example 1. there will be a new error:

In function 'void setup()': error: expected `)' before numeric constant In function 'void loop()':

there will be a new error:

No, there won't. The code above will compile if you remove the line as instructed.

Why don't you just load the example from the arduino environment? While you enjoy the blinking LED, you can read through basics in programming from the reference, especially read a few more basic examples to get a feeling about what pieces are doing what in a program.

thanks all, it works now after I deleted the example, and wrote it again

thansk all, its working now.