Nokia.h.ino: In function 'void setup()':
Nokia.h:10: error: redefinition of 'void setup()'
Nokia.h:10: error: 'void setup()' previously defined here
Nokia.h.ino: In function 'void loop()':
Nokia.h:11: error: redefinition of 'void loop()'
Nokia.h:14: error: 'void loop()' previously defined here
Nokia.h.ino: In function 'void Initiate()':
Nokia.h:13: error: redefinition of 'void Initiate()'
Nokia.h:18: error: 'void Initiate()' previously defined here
Nokia.h.ino: In function 'void SendData(byte)':
Nokia.h:23: error: redefinition of 'void SendData(byte)'
Nokia.h:28: error: 'void SendData(byte)' previously defined here
Nokia.h.ino: In function 'void SendCmd(byte)':
Nokia.h:30: error: redefinition of 'void SendCmd(byte)'
Nokia.h:35: error: 'void SendCmd(byte)' previously defined here
redefinition of 'void setup()'
You've done 20 posts, but are not following the guidelines written by Nick Gammon in his two posts at the top of this Forum. Read those and start posting your code correctly.
I can create that error easily. Create that same code and save it as two different file names, then use "Sketch - Add File" to add the second file to the first.
Here I used sketch_aug12b as the first file and sketch_aug12c as the second. Then I used "Sketch - Add File" to add sketch_aug12c to the original sketch_aug12b. This is the result.
sketch_aug12c.ino: In function 'void setup()':
sketch_aug12c:10: error: redefinition of 'void setup()'
sketch_aug12b:10: error: 'void setup()' previously defined here
sketch_aug12c.ino: In function 'void loop()':
sketch_aug12c:14: error: redefinition of 'void loop()'
sketch_aug12b:14: error: 'void loop()' previously defined here
sketch_aug12c.ino: In function 'void Initiate()':
sketch_aug12c:18: error: redefinition of 'void Initiate()'
sketch_aug12b:18: error: 'void Initiate()' previously defined here
sketch_aug12c.ino: In function 'void SendData(byte)':
sketch_aug12c:28: error: redefinition of 'void SendData(byte)'
sketch_aug12b:28: error: 'void SendData(byte)' previously defined here
sketch_aug12c.ino: In function 'void SendCmd(byte)':
sketch_aug12c:35: error: redefinition of 'void SendCmd(byte)'
sketch_aug12b:35: error: 'void SendCmd(byte)' previously defined here
redefinition of 'void setup()'
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
You must remove one of the files. There is probably two tabs in the IDE window, correct? You must go to your sketch folder, enter that sketch name folder (Nokia?) and remove the duplicate file.
SurferTim:
I can create that error easily. Create that same code and save it as two different file names, then use "Sketch - Add File" to add the second file to the first.
Here I used sketch_aug12b as the first file and sketch_aug12c as the second. Then I used "Sketch - Add File" to add sketch_aug12c to the original sketch_aug12b. This is the result.
You must remove one of the files. There is probably two tabs in the IDE window, correct? You must go to your sketch folder, enter that sketch name folder (Nokia?) and remove the duplicate file.
Thanks!
Also, sorry to the minimod. I should read up on the guidelines. It was a rushed post before I had to go to bed.
^-^'
It turned out the problem was that each time I saved the file it opened a new tab that was a copy of the original.
Thanks for the help!
And sorry for being late, but I'll go ahead and add those code headers.