Dumb error toying with Keyboard.press()

Hi all,

first thing first: I am a dumb. I wrote a little sketch to play with my new Arduino micro and made the only error i had to avoid (expecially because i was warned): uploaded a code with a keypress and now, as soon as i connect my arduino a row of "1" is sent to my PC, making impossible to upload a fixed code to the device.

Not sure if it's of any help, but i am working on vista OS and using the 1.0.5 version of the IDE (the latest showed some sort of comunication problem)

How can i solve? :-[

Thanks in advance ...

Ok solved the "usual" way: with trial and error for the right timing, by resetting and uploading another code ... dumb... :slight_smile:

Hi Barito,

try this:
preparation:

  • open a text editor to catch the generated keyboard strokes.
  • open the Arduino IDE and load a sketch thats small (for example the blink-sketch)
  • select your board type in the ideupload process:
  • focus your editor window so comming keyboard strockes will go there.
  • connect your leonardo and if you see the '1' comming hit the reset button on your board.
  • imediatly swtich to the ide and Upload the new sketch.
  • hopefully this works :slight_smile:
    Arduino MICRO & Genuino MICRO:

[quote author=Automatic (Software) Reset and Bootloader Initiation]
....
After the processor resets, the bootloader starts, remaining active for about 8 seconds. The bootloader can also be initiated by pressing the reset button on the Micro. Note that when the board first powers up, it will jump straight to the user sketch, if present, rather than initiating the bootloader. [/quote]

(i was a moment to slow with my answer..)
ok - good you get the right timming :wink:

sunny greetings
stefan