I'm trying to get a micro servo to run off the Arduino Uno and I've wired it up without a breadboard because I didn't have one to hand.
But every time I try to load the sketch from the library I get an error code....
'Arduino: 1.8.20 Hourly Build 2022/04/25 09:33 (Windows 10), Board: "Arduino Uno"
C:\Users\happy\OneDrive\Documents\Arduino\sketch_jun02a\code_for_project_1.ino: In function 'void setup()':
code_for_project_1:10:6: error: redefinition of 'void setup()'
void setup() {
^~~~~
C:\Users\happy\OneDrive\Documents\Arduino\sketch_jun02a\sketch_jun02a.ino:10:6: note: 'void setup()' previously defined here
void setup() {
^~~~~
C:\Users\happy\OneDrive\Documents\Arduino\sketch_jun02a\code_for_project_1.ino: In function 'void loop()':
code_for_project_1:14:6: error: redefinition of 'void loop()'
void loop() {
^~~~
C:\Users\happy\OneDrive\Documents\Arduino\sketch_jun02a\sketch_jun02a.ino:15:6: note: 'void loop()' previously defined here
void loop() {
^~~~
C:\Users\happy\OneDrive\Documents\Arduino\sketch_jun02a\code_for_project_2.ino: In function 'void setup()':
code_for_project_2:5:6: error: redefinition of 'void setup()'
void setup() {
^~~~~
C:\Users\happy\OneDrive\Documents\Arduino\sketch_jun02a\sketch_jun02a.ino:10:6: note: 'void setup()' previously defined here
void setup() {
^~~~~
C:\Users\happy\OneDrive\Documents\Arduino\sketch_jun02a\code_for_project_2.ino: In function 'void loop()':
code_for_project_2:9:6: error: redefinition of 'void loop()'
void loop() {
^~~~
C:\Users\happy\OneDrive\Documents\Arduino\sketch_jun02a\sketch_jun02a.ino:15: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.'
surely if the sketch is already in the library it shouldn't have an error, well you'd think so wouldn't you.
I'm sure I'm doing something wrong here. So if anyone knows what this error means I'd be glad to hear about it.
Thanks a lot.