I was helping my friend with some code for a dancing fountain but it … broke ?
The code has worked before , we have read many forums saying that you can only have one setup and loop which is what we did. its supposed to turn on and off different pumps in a dancing fountain , simple stuff , but i dont know where we went wrong. please help , we are using a arduino uno ? i think. (im a materials science major not CS unfortunately)
ERROR MESSAGE :
Arduino: 1.8.12 (Windows 10), Board: “Arduino Uno”
C:\Users\apowe\Videos\Desktop\Dancing_Fountain\The_ecstacy_of_gold__fountain_chero_\Dancng_Fountain\Dancng_Fountain.ino: In function ‘void setup()’:
Dancng_Fountain:7:6: error: redefinition of ‘void setup()’
void setup() { //continuously loop the program
^~~~~
C:\Users\apowe\Videos\Desktop\Dancing_Fountain\The_ecstacy_of_gold__fountain_chero_\Dancng_Fountain\Dancng_Fountain.ino:1:6: note: ‘void setup()’ previously defined here
void setup() { // initialize digital pin 1,2,3 as an output.
^~~~~
C:\Users\apowe\Videos\Desktop\Dancing_Fountain\The_ecstacy_of_gold__fountain_chero_\Dancng_Fountain\Simple_gifts__fountain_chero_.ino: In function ‘void setup()’:
Simple_gifts__fountain_chero_:1:6: error: redefinition of ‘void setup()’
void setup() { // initialize digital pin 1,2,3 as an output.
^~~~~
C:\Users\apowe\Videos\Desktop\Dancing_Fountain\The_ecstacy_of_gold__fountain_chero_\Dancng_Fountain\Dancng_Fountain.ino:1:6: note: ‘void setup()’ previously defined here
void setup() { // initialize digital pin 1,2,3 as an output.
^~~~~
C:\Users\apowe\Videos\Desktop\Dancing_Fountain\The_ecstacy_of_gold__fountain_chero_\Dancng_Fountain\Simple_gifts__fountain_chero_.ino: In function ‘void setup()’:
Simple_gifts__fountain_chero_:7:6: error: redefinition of ‘void setup()’
void setup() { //continuously loop the program
^~~~~
C:\Users\apowe\Videos\Desktop\Dancing_Fountain\The_ecstacy_of_gold__fountain_chero_\Dancng_Fountain\Dancng_Fountain.ino:1:6: note: ‘void setup()’ previously defined here
void setup() { // initialize digital pin 1,2,3 as an output.
^~~~~
C:\Users\apowe\Videos\Desktop\Dancing_Fountain\The_ecstacy_of_gold__fountain_chero_\Dancng_Fountain\Squib cakes.ino: In function ‘void setup()’:
C:\Users\apowe\Videos\Desktop\Dancing_Fountain\The_ecstacy_of_gold__fountain_chero_\Dancng_Fountain\Squib cakes.ino:1:6: error: redefinition of ‘void setup()’
void setup() { // initialize digital pin 1,2,3 as an output.
^~~~~
C:\Users\apowe\Videos\Desktop\Dancing_Fountain\The_ecstacy_of_gold__fountain_chero_\Dancng_Fountain\Dancng_Fountain.ino:1:6: note: ‘void setup()’ previously defined here
void setup() { // initialize digital pin 1,2,3 as an output.
^~~~~
C:\Users\apowe\Videos\Desktop\Dancing_Fountain\The_ecstacy_of_gold__fountain_chero_\Dancng_Fountain\The_ecstacy_of_gold__fountain_chero_.ino: In function ‘void setup()’:
The_ecstacy_of_gold__fountain_chero_:1:6: error: redefinition of ‘void setup()’
void setup() { // initialize digital pin 1,2,3 as an output.
^~~~~
C:\Users\apowe\Videos\Desktop\Dancing_Fountain\The_ecstacy_of_gold__fountain_chero_\Dancng_Fountain\Dancng_Fountain.ino:1:6: note: ‘void setup()’ previously defined here
void setup() { // initialize digital pin 1,2,3 as an output.
^~~~~
C:\Users\apowe\Videos\Desktop\Dancing_Fountain\The_ecstacy_of_gold__fountain_chero_\Dancng_Fountain\The_ecstacy_of_gold__fountain_chero_.ino: In function ‘void loop()’:
The_ecstacy_of_gold__fountain_chero_:7:6: error: redefinition of ‘void loop()’
void loop() { //continuously loop the program
^~~~
C:\Users\apowe\Videos\Desktop\Dancing_Fountain\The_ecstacy_of_gold__fountain_chero_\Dancng_Fountain\Squib cakes.ino:7:6: note: ‘void loop()’ previously defined here
void loop() { //continuously loop the program
^~~~
exit status 1
redefinition of ‘void setup()’
This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.
The_ecstacy_of_gold__fountain_chero_.ino (1.76 KB)