Hi
I've built an arduino on breadboard. Everything works fine but after uploading a sketch that contains serial communication I cant upload sketches anymore I get the "not in sync error" the 10 attempts fail instantly. I have to burn the bootloader again to fix it. the sketch that causes the problem is as follows
int sensorpin=A0;
void setup() {
Serial.begin(9600);
}
void loop() {
int sensor;
float temp;
sensor=analogRead(sensorpin);
Serial.print(sensor);
temp=(sensor/1023)*5000;
Serial.print(temp/10-273.15);
delay(3000);
}
any help would be appreciated.
ahmadx87:
I have to burn the bootloader again to fix it.
That is a CLASSIC symptom of the Auto-Reset circuit not working. Did you include auto-reset in your circuit? Did you try a manual reset?
Thanks for your reply.
Yeah I've added the 0.1uF capacitor and 10k resistor. I kept searching and finally I read somewhere that I had to unplug the cable (I use FTDI cable) hold down the manual reset button and plug the cable back in and upload the sketch and when Arduino starts uploading I should release the button! This way I could upload sketches again without having to burn the bootloader again. It's a bit tricky as to when to release the button. Why doesn't auto reset work???
I have no problem uploading new sketches after "ReadAnalogVoltage" example sketch but after uploading"DigitalReadSerial" this happens.