Hello. I need help troubleshooting an error for the following code:
int loopCount=0;
void setup()
{
Serial.begin(9600);
pinMode(12, OUTPUT);
pinMode(11, OUTPUT);
pinMode(10, OUTPUT);
}
void loop()
{
loopCount++;
digitalWrite(10+loopCount%3, HIGH);
delay(500);
Serial.println("--------");
Serial.println("loopCount:");
Serial.println(loopCount);
Serial.println("12:");
Serial.println(digitalRead(12));
Serial.println("11:");
Serial.println(digitalRead(11));
Serial.println("10:");
Serial.println(digitalRead(10));
Serial.println("--------");
digitalWrite(10+loopCount%3, LOW);
delay(500);
Serial.println("--------");
Serial.println("loopCount:");
Serial.println(loopCount);
Serial.println("12:");
Serial.println(digitalRead(12));
Serial.println("11:");
Serial.println(digitalRead(11));
Serial.println("10:");
Serial.println(digitalRead(10));
Serial.println("--------");
}
The error I get is the following:
Arduino: 1.8.5 (Windows 7), Board: "Arduino/Genuino Uno"
Sketch uses 2800 bytes (8%) of program storage space. Maximum is 32256 bytes.
Global variables use 222 bytes (10%) of dynamic memory, leaving 1826 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x68
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x68
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x68
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x68
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x68
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x68
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x68
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x68
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x68
avrdude: stk500_recv(): programmer is not responding
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x68
Invalid library found in C:\Users####\Documents\Arduino\libraries\readme.txt: C:\Users####\Documents\Arduino\libraries\readme.txt
Invalid library found in C:\Users####\Documents\Arduino\libraries\readme.txt: C:\Users####\Documents\Arduino\libraries\readme.txt
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I've made sure that the ports and the board are ok in the tools menu. What do you believe might be causing the problem?