Einleitung

Anytime you use the Arduino Leonardo as a keyboard or mouse, you risk losing the capability to upload code to the Leonardo through the USB port. By our experience, without proper programming procedures, the Leonardo essentially takes over USB communication. Our Fast Fix project demonstrates how to repair this issue so that your Arduino Leonardo can be used in other projects.

  1. Ufwi4yfXD4XUFeDB
    • Make your way to the Arduino downloads page at https://www.arduino.cc/en/Main/Software.

    • Download the Arduino IDE that matches your operating system.

    • Follow the installation process for the application and run it.

  2. xkojXXP2JSZGMOCF
    xkojXXP2JSZGMOCF
    wZIlAyAhuSvIXkZd
    kBKlmaFVPO4a4aQB
    • Grab your USB Type-A to Type-B cable.

    • Plug the Type-B end of the cable into your Arduino UNO.

    • Insert the Type-A end into the device with the Arduino IDE software installed.

  3. xCUrTcgIo2SfNHSQ
    xCUrTcgIo2SfNHSQ
    xCohpORnHN5guuGW
    • Open up the ArduinoISP source code by going to: File->Examples->ArduinoISP ->ArduinoISP from the toolbar.

    • A new window will open up with the ArduinoISP source code.

  4. 11XwJvBykamCiqQl
    11XwJvBykamCiqQl
    4jJKarjFBQ5amWJE
    3vICZZAeWWPQgDeV
    • Select the proper port that your Arduino Uno is connected to by selecting: Tools->Port, and then the COM port labeled with "Arduino/Genuino Uno".

    • To upload the ArduinoISP source code to the Arduino Uno, click on the circle with an arrow in the top left corner of the Arduino IDE.

    • As soon as the code is done uploading, unplug the USB cable from your computer.

  5. WDmktnJeIVGaVsJi
    WDmktnJeIVGaVsJi
    1WmEDB5jm3RdOLEZ
    uA35pvC3e5vXeoEM
    • Insert one of your male to male jumper wires into the 5V pin.

    • Then insert a separate male to male jumper wire into the GND (Ground) pin.

  6. h1jfWT6wY4hOXYdK
    h1jfWT6wY4hOXYdK
    wgchsPKV3RUFj3sZ
    • Insert the last male to male wire into pin 10.

    • Insert one of the male to female wires into pin 11.

  7. JkgeMwvXGahJLJaj
    JkgeMwvXGahJLJaj
    vyxnChXJucfOvYZ1
    xxC1ALogPioyLKB2
    • Insert the 2nd male to female wire into pin 12.

    • Insert the 3rd and last male to female wire into pin 13.

  8. L5Ikpim4KZBXZkVe
    L5Ikpim4KZBXZkVe
    HwyEyUXbNoUPEwbv
    • Take the wire in the 5V pin on the Uno and proceed to link it to 5V pin on the Leonardo.

    • Take the wire in the GND pin from the Uno and proceed to link it to the GND pin on the Leonardo.

  9. NedQhKXSdcAYIyJP
    NedQhKXSdcAYIyJP
    bPOGYiAGP5JTcifD
    • Now take the capacitor and plug one end into the GND pin and one end into the RESET pin.

    • Take the wire plugged into pin 10 on the Uno and link it to the RESET pin on the Leonardo

  10. XOY13vtMcrTAFpUk
    XOY13vtMcrTAFpUk
    WyVOypOBN3xSKnTv
    bxTkUJKiOQvTpADE
    • On the back of the Leonardo board, there is a set of six pins.

    • Take the wire connected to pin 11 on the Uno and plug it into the middle pin of the pins furthest to the back of the board.

    • Take the wire connected to pin 12 on the Uno and plug it into the first pin on the set of three pins going toward the board (the pin closest to the Leonardo label).

    • Finally, take the wire connected to pin 13 on the Uno and plug it into the middle pin of the inner row of three pins.

  11. RADBAVewvAhRkEcV
    RADBAVewvAhRkEcV
    pyyS2cYFm1fJYsNn
    cPQFOtM2TlZUBEBL
    • To upload the bootloader to the Arduino Leonardo, select the Arduino Leonardo board from Tools->Board->Arduino Leonardo.

    • Next, choose the Arduino as ISP programmer from Tools->Programmer->Arduino as ISP.

    • Ensure the Arduino Uno is plugged into your computer and that the proper COM port is selected in the Arduino IDE.

    • Finally, upload the bootloader to the Arduino Leonardo by selecting Tools->Burn Bootloader.

  12. 43R5sDXrS2nMbegV
    43R5sDXrS2nMbegV
    tcEDg3wmX2I3qLXu
    ZbqAJSxiMPVhInPn
    • Now grab your USB Micro-B to Type-A cable

    • Plug the Micro-B end of the cable into the Arduino Leonardo.

    • Plug the Type-A end of the cable into the laptop.

    • If all has gone well, your Arduino Leonardo should no longer be sending keyboard commands to your computer.

Abschluss

Now, your Arduino Leonardo should be able to receive code from your computer over USB again.

Andrew Maddox

Mitglied seit: 21/05/19

429 Reputation

5 Kommentare

Can i use arduino nano instead of arduino uno ?

hleli firas -

You can use the nano but you have to know which "pins" to use. This great tutorial is specific for the Uno.

Allen -

Thank you! Everything works. Keep up the good work!

Антон Петров -

Dude, you have no idea how hard it was to find such a great tutorial like this! Nice job, keep doing that! Thank you soo much.

m.l.aires -

Hey, nice tutorial, but I am having a problem when it comes to running the "Burn Bootloader". I am getting the following output message:

avrdude: Yikes! Invalid device signature.

Double check connections and try again, or use -F to override

this check.

Error while burning bootloader.

Any help is appreciated.

Vegard -