I am trying to program my arduino, I keep getting the error
avrdude: stk500_getsync(): not in sync: resp=0x00
I have tried 2 arduinos and 2 computers.
Here is the code
int led1= 0; // green led 1
int led2= 1; // green led 2
int led3= 2; // green led 3
int led4= 3; // green led 4
int led5= 4; // green led 5
int led6= 5; // green led 6
int led7= 6; // green led 7
int led8= 7; // green led 8
int led9= 8; // yellow led 1
int led10= 9; // red led 1
void setup () {
pinMode (led1, OUTPUT);
pinMode (led2, OUTPUT);
pinMode (led3, OUTPUT);
pinMode (led4, OUTPUT);
pinMode (led5, OUTPUT);
pinMode (led6, OUTPUT);
pinMode (led6, OUTPUT);
pinMode (led7, OUTPUT);
pinMode (led8, OUTPUT);
pinMode (led9, OUTPUT);
pinMode (led10, OUTPUT);
}
;
void loop() {\
digitalWrite(led1, HIGH);
delay(1000);
}
This happens when Pin 0 (RX) is not free ; and when the sketch is uploaded to the Arduino, it is done via this pin. This is probably why you got this error : the sketch couldn't be uploaded.
It has happened to me. Try again by disconnecting everything that is connected to Pin 0 (your led in this case).
Before you start playing with the arduino, keep these things in mind...
Yesterday I found that page. This is very essential to know about.
You may destroy the arduino board by drawing more current via the microcontroller because you have added 10 leds & if the total current is more than 200mA, BOOOMMMMmmm...! the Atmega328 is toasted. BEWARE & BE-AWARE
Check the ""Method #10: Exceed Total Microcontroller Current"".