Hello
I have been using a arduino uno for a while and it worked great until yesterday.
I was able to upload programs on a ubuntu machine then a 64 bit windows machine.
Then i loaded a simple serial program and powered the uno with a 12v dc supply and pluged in the serial/usb line.
I wanted to be able to open a terminal and communicate with the arduino. This failed.
Since then I have been unable to load even the blink program.
I get the following error
avrdude: stk500_getsync(): not in sync: resp=0x00.
I have read a few topics on this and most of the time it looks like a serial port error. But I was working and did not change my serial port settings. I have also tried to hold down the reset then plug in the serial port, release reset then upload a program. That failed.
Can anyone give me any suggestions on how to recover my uno. Just in case I have the very simple code I used before the uno locked up.
Thanks
Aaron
// pins for control
const int pin2 = 2;
const int pin4 = 4;
const int pin7 = 7;
void setup() {
// initialize serial:
Serial.begin(9600);
// make the pins outputs:
pinMode(pin2, OUTPUT);
pinMode(pin4, OUTPUT);
pinMode(pin7, OUTPUT);
}
void loop() {
// if there’s any serial available, read it:
while (Serial.available() > 0) {
// look for the next valid integer in the incoming serial stream:
int oneIn = Serial.parseInt();
// do it again:
int twoIn = Serial.parseInt();
// do it again:
int threeIn = Serial.parseInt();
// look for the newline. That’s the end of your
// sentence:
if (Serial.read() == ‘\n’) {
if(oneIn == 1) {
digitalWrite(pin2,HIGH);
Serial.println(“Pin 2 toggle”);
delay(1000);
digitalWrite(pin2,LOW);
}
if(twoIn == 1) {
digitalWrite(pin4,HIGH);
Serial.println(“Pin 4 toggle”);
delay(1000);
digitalWrite(pin4,LOW); }
if(threeIn == 1) {
digitalWrite(pin7,HIGH);
Serial.println(“Pin 7 toggle”);
delay(1000);
digitalWrite(pin7,LOW); }
}
}
}