Search code examples
arduinoarduino-ide

Unable to Reset the Arduino Leonardo Code


I was trying to learn about the keyboard simulation using Arduino Leonardo Pro Mini.

The code i wrote was

#include <Keyboard.h>

void setup() {
Keyboard.begin()
}

void loop() {
Keyboard.println("Hello World");
}

This works fine, now i want to reset the microcontroller with the empty code, which is

void setup()
{
}

void loop()
{
}

But the previous code doesn't let me do this. The following is the error, even though the port selection is correct (i am sure about that)

avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00


Solution

  • This error is not related to the code you're uploading.

    Caused by:

    • missing bootloader
    • broken bootloader
    • wrong bootloader settings
    • faulty connection
    • stuff connected to hardware Rx/Tx ...