Arduino string / password keyboard emulator using reset button

Arduino has a nice Keyboard library that allows it to pretend to be a keyboard to any host it is connected to. This allows you to automatically “type” passwords or strings, eliminating a potential source of error (though this still obviously exists while programming the arduino). Unlike other examples, this does not require you to have an external button or the like. The reset button will simply act as the activator.

To start the “typing” of the string, either plug the arduino into the USB port or if already connected to the USB port, simply press the arduino’s reset button and it will print the programming string. On the Arduino Due, you will have to connect the USB cable to the “native USB” port, rather than the programming port.

Here’s the code arduino code:

void setup() {
  // do not remove this delay or you will brick the arduino
  delay(1000);
  Keyboard.begin();
  Keyboard.println("replace with string to be printed");
  Keyboard.end();
}

void loop() {
  // put your main code here, to run repeatedly:
}
 
8
Kudos
 
8
Kudos

Now read this

How did Apple forget to focus its product line-up?!

When Steve Jobs returned to Apple he famously trimmed the line-up to only a few products, thereby focussing the company and presenting a coherent set of options to consumers. As Apple has grown over the last couple of years, its product... Continue →