Using a pair of Arduinos to mimic a keyboard

Here’s a video:

So in my last post I showed you a way that I used a single arduino to talk to a Raspberry Pi (or any other computer) over HID. I’ve updated the project a bit and now I can input any number of things into the pi. Basically this is how it works.

Serial Console on computer -> Arduino Mega -> software serial port -> Arduino micro -> HID on other second computer (in this case the Pi)

There are two buttons that handle pressing the enter key and the delete key as those are hard to send over serial.

There are a few bits of relevant code, both for the arduino. Here’s the mega’s code:

And here’s the side for the arduino micro, that writes as an HID.

Hey! This post was written a long time ago, but I'm leaving it up on the off-chance it may help someone. Proceed with caution. It may not be a good idea to blindly integrate this code or work into your project, but instead use it as a starting point.

3 Comments

      1. I find this brilliantly. First i am just starting micro, with a keyboard project. This gives me a place to start of. Second i like the way you solve the problem with what on hand 🙂

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.