Turning Your Pro Micro Into a Keyboard

Check out this tutorial about turning your Pro Micro into a USB Keyboard or Mouse!

Favorited Favorite 0

The Pro Micro is a small Arduino-compatible microcontroller centered around an ATmega32U4 - an 8-bit AVR very similar to the ATmega328 with one caveat - the 32U4 comes equipped with a full-speed USB transceiver. That means that when you connect the Arduino to your computer, they're connected directly over the USB bus so the Pro Micro can be programmed to emulate any USB device you could imagine. So what does that give us? Let's check it out in this tutorial from SparkFun engineer Jim about How to Turn Your Pro Micro into a USB Keyboard or Mouse.

Say for example, your laptop lacks a keypad. That's where the Pro Micro comes in! By pairing the ProMicro with our 12-Button Keypad, you're just a few wires away from your very own DIY USB keypad. In the tutorial, Jim will also tell you how to turn your ProMicro into a mouse using a joystick andhttp://www.sparkfun.com/products/9032 how to use that same joystick as an arcade controller - all over USB. Check out the tutorial to learn more!


Comments 20 comments

  • Hmm I would almost call the usb transceiver an advantage not a caveat

  • Yvan256 / about 12 years ago * / 2

    When you think arcade joystick it's usually digital on/off with microswitches, not analog values. That 9032 joystick would be more appropriate to make a custom Playstation-style controller.

    Can the 32U4 be configured as a real, digital joystick with multiple input buttons and no ghosting or limitations on the push/release signals?

    • MatthewR / about 12 years ago / 1

      I would also like to know about the joystick abilities.

    • tetsujin / about 12 years ago / 1

      Usually... But there are advantages to using analog joysticks for arcade games. For instance, you can translate the output of the analog stick different ways to tweak the dead zones or overlap between the four cardinal directions, to make it behave more like a 4-way or 8-way joystick, make the diagonals harder or easier to hit, etc. to suit different games. (There are a few games, like Donkey Kong IIRC which will actually flake out if you hit a diagonal - so the joystick input for the game really does need to be 4-way.)

      • Yvan256 / about 12 years ago / 1

        Given that some people prefer some types of microswitches joysticks vs others (ex: Sanwa vs Seimitsu vs Happ), I don't see many arcade cabinets using analog joysticks, except specific cases where the original game used that, which is a handful at best.

        And it doesn't change the fact that some games require "digital joystick" inputs, not keyboard keys or analog joystick values.

  • Static / about 12 years ago / 1

    OK, I'm going to go downstairs and tear apart my old non-functioning Saitek to integrate with this.

  • Awwwww I thought you meant a USB MIDI Controller keyboard. D:

  • TECH GEEK / about 12 years ago / 1

    Is this EVER going to be back in stock???!!!?

    http://www.sparkfun.com/products/9698

    • It's unlikely - there's an issue with the supply being available to us that probably isn't going to resolve any time soon.

    • you can buy them here

      edit: sorry, didnt look all that much, there all so out of stock but its cheaper there

  • would it be possible to do this with an Uno?

    • stcarlso / about 12 years ago / 1

      You could do this with an Uno if one went slightly hard-core (no pun intended) and used an AVR-ICSP programmer to re-burn the ATmega8U2/ATmega16U2 on the board with a keyboard/mouse emulator. Not impossible, but to fit it in you may need to write in raw C with registers, bit masks, and all; the Arduino library + LUFA is (probably) too big. This isn't possible by just writing code for the main ATmega328P, unless one does what someone else suggested and write a PC-side application too.

    • htimmis / about 12 years ago / 1

      You can use the dll files that control the keyboard and mouse and integrate your Arduinos code with it through a top level application such as C#, VB, LabVIEW, etc...

      • hmm, how might i ask? :-)

        • vcazan / about 12 years ago / 1

          Easy, go to my site here: http://www.vladcazan.com/previous-projects/electronics/arduino-keyboard-emulator

        • Pretty much the same way as with this, except the Uno has a different USB interface so it would probably be harder, not sure how one would do it but it could be done (and has been done). :)

  • sgrace / about 12 years ago / 1

    Back home, my folks have a wireless garage door opener attached to the side of the house. Whole idea of it was so us kids could get in without a key (I somehow still remember the combo). Not sure if anyone does that anymore, but this would a great project to attach to an Xbee for wireless entry, or attach to LinuxMCE to be part of your home automation/security.

    • EvilGenius121 / about 12 years ago / 1

      You could definitely use an xbee- though RFID could be better and easier.

Related Posts

Why L-Band?

Recent Posts

Why L-Band?

Tags


All Tags