Setting up board and this happened

Arduino: 1.8.15 (Windows Store 1.8.49.0) (Windows 10), Board: "Arduino Uno"

C:\Users\jonah\OneDrive\Documents\Arduino\blinking_light\stoplight.ino: In function 'void setup()':

stoplight:6:6: error: redefinition of 'void setup()'

void setup() {

  ^~~~~

C:\Users\jonah\OneDrive\Documents\Arduino\blinking_light\blinking_light.ino:1:6: note: 'void setup()' previously defined here

void setup() {

  ^~~~~

C:\Users\jonah\OneDrive\Documents\Arduino\blinking_light\stoplight.ino: In function 'void loop()':

stoplight:12:6: error: redefinition of 'void loop()'

void loop(){

  ^~~~

C:\Users\jonah\OneDrive\Documents\Arduino\blinking_light\blinking_light.ino:6:6: note: 'void loop()' previously defined here

void loop() {

  ^~~~

exit status 1

redefinition of 'void setup()'

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Do you have more than one tab open?

yes

don't :slight_smile:

a sketch can have multiple tabs but you can't have multiple indepedant sketches in tabs
open a new window for each new project

And do both tabs have loop and setup functions?

yeah

thx

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.