Help Error message!

I have a book called "Arduino for Beginners" by Mike Cheich in which there is a sketch to make an LED blink but when entered on my netbook it gives me an error message "redefinition of void loop () This void loop appears within the sketch I have copied. Anyone help me to resolve the issue ?

Regards
Ian

Yes, we can.
Post your sketch to see what happens.

You have 2 loop() functions in your sketch in the IDE

How many tabs do you have open in the IDE ?

Your post was MOVED to its current location as it is more suitable.

Please bare with me on this

No thanks :grinning:

The Ardunino Code

/*
*Blink Turns on an LED on for one second, then off for one
*second, repeatedly
*/

// Pin 13 has an LED connected on most Arduino boards.
// Give it a name:
int led = 13;

// The setup routine runs once when you press reset:
void setup() {
// Initiate the digital pin as an output.
pinMode(led, OUTPUT);

}

// The loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH);
// Turn the led on (HIGH is the voltage level)
delay(1000);
// Wait for a second
digitalWrite(led. LOW);
// Turn the LED off by making the voltage LOW
delay(1000);
// Wait a second

}

Please follow the advice given in the link below when posting code. Use code tags (the </> icon above the compose window) to make it easier to read and copy for examination

That sketch is okay, so you are doing something weird when you present it to the IDE.

And the answer is ?

UKHelibob,

If I knew what you meant it would help I am doing it through the Cloud using the "Web Editor " !

It may have helped if you had said that earlier

When using the Web editor you can have 2 or more tabs in the editor, like this
image
In this example there are 2 tabs. One named Blink.ino and the other, Blink.txt

Do you have more than one tab and if so what are their names and what is on them

I will stop helping. If you want further help you should follow the recommendations given in this post. Especcially with beeing so short on information you annoy your potential helpers.

I have just two tabs open named,
Blink_LED.ino and ReadMe.adoc

Please post the full contents of both tabs

There is a bug in your code:

You can learn how to use the digitalWrite function here:
https://www.arduino.cc/reference/en/language/functions/digital-io/digitalwrite/