Cannot compile sketch

Total newbie. I suspect I have not configured something. Can someone help me figure out why this is not compiling. (RGB Led ... tutorial 4).

/private/var/folders/6n/2g_v9kdn5n5fzgw4czrf7l3r0000gn/T/.arduinoIDE-unsaved2025919-1640-1gekegc.8opa/sketch_oct19a/RGB_LED.ino: In function 'void setup()':
/private/var/folders/6n/2g_v9kdn5n5fzgw4czrf7l3r0000gn/T/.arduinoIDE-unsaved2025919-1640-1gekegc.8opa/sketch_oct19a/RGB_LED.ino:9:6: error: redefinition of 'void setup()'
void setup()
^~~~~
/private/var/folders/6n/2g_v9kdn5n5fzgw4czrf7l3r0000gn/T/.arduinoIDE-unsaved2025919-1640-1gekegc.8opa/sketch_oct19a/sketch_oct19a.ino:1:6: note: 'void setup()' previously defined here
void setup() {
^~~~~
/private/var/folders/6n/2g_v9kdn5n5fzgw4czrf7l3r0000gn/T/.arduinoIDE-unsaved2025919-1640-1gekegc.8opa/sketch_oct19a/RGB_LED.ino: In function 'void loop()':
/private/var/folders/6n/2g_v9kdn5n5fzgw4czrf7l3r0000gn/T/.arduinoIDE-unsaved2025919-1640-1gekegc.8opa/sketch_oct19a/RGB_LED.ino:25:6: error: redefinition of 'void loop()'
void loop()
^~~~
/private/var/folders/6n/2g_v9kdn5n5fzgw4czrf7l3r0000gn/T/.arduinoIDE-unsaved2025919-1640-1gekegc.8opa/sketch_oct19a/sketch_oct19a.ino:6:6: note: 'void loop()' previously defined here
void loop() {
^~~~
exit status 1

Compilation error: redefinition of 'void setup()'

  • In the Arduino IDE, use Ctrl T or CMD T to format your code then copy the complete sketch.
    Use the < CODE / > icon from the ‘posting menu’ to attach the copied sketch.

It looks like you have two setup and two loop defined in your ino

I moved your topic to an appropriate forum category @falkson.

In the future, when creating a topic please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

You have two .ino files in the sketch folder, each of which has a setup() and loop() function. The compiler combines all .ino files within a folder when compiling.

Thanks. Problem solved.