We are trying to input a music code into our arduino with a tetris game and we get an error because loop and setup are defined in both the game code and music code. The music code is not saved as a zip library so I have to include it using a separate tab instead of just including the library. I included the file for our code that we have.
I don't know if there's a way to redefine loop and setup so the code still works the same or if there's a way to compile it into one code in order to not have loop and setup defined twice.
We are trying to input a music code into our arduino with a tetris game and we get an error because loop and setup are defined in both the game code and music code. The music code is not saved as a zip library so I have to include it using a separate tab instead of just including the library. I included the file for our code that we have.
I don't know if there's a way to redefine loop and setup so the code still works the same or if there's a way to compile it into one code in order to not have loop and setup defined twice.
You cannot have two definitions of a function of the same name
If you're combining sketches, you need to combine the contents of the setup and loop functions into one setup and one loop function for the combined sketch.
This means that both files will need to be modified, and it may be best to combine into one single file.
If i deleted the delay lines in the music code would it work then?
Almost certainly not. Those delays are probably there for a reason.
It is also teling me I am using 68 bytes too much of memory.
If it's RAM you are using too much of you can usually move string constants out of RAM and into FLASH.