embedded - 'An error occurred while uploading the sketch' Arduino -
i learning receive data uart pins of arduino. using spec gas sensor same. here simplest code write.
void setup() { serial.begin(9600); } void loop() { if(serial.available()>0) { serial.print(serial.available()); } } the code verifies when try burn code in arduino uno, following error after says code uses 5% of storage space.
sketch uses 1744 bytes (5%) of program storage space. maximum 32256 bytes. global variables use 184 bytes (8%) of dynamic memory, leaving 1864 bytes local variables. maximum 2048 bytes. avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x1e avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x66 avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x7e avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x06 avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x86 avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xf8 avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x06 avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x7e avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x86 avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x9e error occurred while uploading sketch i checked online solution provide basic answers restarting everything. doesn't work.
please help.
when uploading sketch, must disconnect serial i/o pins devices before upload succeeds.
the uno shares 2 hardware serial pins usb that's used perform sketch upload, nothing else can connected serial pins (0 , 1).
if recall correctly, need disconnect rx pin, that's memory, disconnect both , it'll work.
Comments
Post a Comment