It would be a fun ride to metamorphose any switch, joystick, sensor or other electrical gadgets into a USB keyboard and/or mouse. To begin with, you can convert any input device into a controller for your computer programs or games. And the most fascinating portion of this tutorial is yet to be explored as you can do every conversion with one line of code, inside the relaxing margins of Arduino. This interesting tutorial by Jimb0 of Sparkfun is dependent to this micro friend: the SparkFun Pro Micro!
Turning ProMicro into a USB Keyboard/Mouse
(Image Courtesy: sparkfun)
The Pro Micro is a small, Arduino-compatible microcontroller positioned around an ATmega32U4 – an 8-bit AVR akin to the ATmega328 with one colossal limitation: The 32U4 comes fitted out with a full-speed USB transceiver. So currently, when you link the Arduino to your computer, they’re attached directly to the USB bus (excuse my RAS). The Pro Micro can be lined up to emulate any USB device you could envisage. You can program it to act just like a mouse, keyboard or other HID-class USB devices.
The HID that can be asked is the distinct USB device classes. Every USB device is allocated a device class, which describes what accurately its universal purpose is. There are tons of classes — printers, hubs, speakers, and webcams but this lesson is going to focus in HID: Human Interface Device.
ProMicro into a USB Keyboard/Mouse Circuit Board
(Image Courtesy: sparkfun)
So the ATmega32U4 is responsible for the USB-hardware hurdle, but do not escape to clear the firmware one. Providentially, the existence of Arduino with the release of 1.0 that comes with built-in support for the ATmega32U4 and its USB core. That USB support comprises HID functionality. Unluckily, that HID has rather tucked away from us. The objective of this tutorial is to elucidate how to use the Arduino HID library, so you can get the most out of your Pro Micro.
Filed Under: Reviews
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.