error: redefinition of 'void setup()

Do you have two tabs in your sketch? When you drag things into the environment, it adds it to the current sketch when you may want to simply open it.

4 Likes