I got almost the same error
I use Duemilanove ATMEGA 328
It work just find until I upload the code that seem to be the reason
after upload this code when I try to upload a new code I will get an error message;
avrdude: stk500_getsync(): not in sync: resp=0x30
First, I thought that the chip is broken so I use another arduino and right after I upload the same code, it has the same problem
here is the code;
#include <Reflector.h>
#include <Move.h>
Move move(2,3,4,5,10,11); //first four pin for each 2 input of each motor(2 motor)
//last two for enable input of ic
Reflector reflector(200);
int dim = 5;
int y = ((dim-1)/2) +1 ;//initial y position
int l = 0;
int r = 1;
int t = 0;
void setup(){
Serial.begin(9600);
}
void loop(){
int inten0, inten1, inten2;
int sensor0, sensor1, sensor2;
sensor0 = reflector.sensor(0); // analorRead pin input of each sensor
sensor1 = reflector.sensor(1);
sensor2 = reflector.sensor(2);
inten0=reflector.reference(sensor0);
inten1=reflector.reference(sensor1);
inten2=reflector.reference(sensor2);
Serial.print(inten0);
Serial.print(" ");
Serial.println(inten1);
move.speed(100,90);
if(inten0 == 1 && inten1 == 1 && y <dim){
move.forward();
y++;
}
if(inten0 == 0 && inten1 == 1 && y == dim && r==1 ){
move.left();
y = 0;
t++;
l==1;
r==0;
}
if(inten0 == 1 && inten1 == 0){
move.right();
y = 0;
t++;
l==0;
r==1;
}
if(t==8&&y==dim){
move.stop();
}
delay(50);
}
So, anyone have any idea