Рет қаралды 176
The Arduino Pro Micro by Sparkfun uses the ATmega32u4, which is very similar to the ATmega328 that classical Arduinos use, but they have native USB support, directly on the main CPU, instead of using an external USB to serial chip like the FTDI. The advantage here is it means the microcontroller can do more USB profiles than just serial, eg: mouse and keyboard. You can send mouse events, like clicking mouse buttons, moving the cursor, or scrolling the scroll wheel, and/or keyboard events, like typing normal text, or pressing page up and page down, etc.
I had previously built a project to control the audio on my computer: an encoder wheel for volume, the encoder-press for mute, and three additional keys for Next Track, Previous Track, and Play/Pause. ...and a bunch of WS2812s because Bling...
I had one board left over, so I quickly assembled it, found the old code, and just changed the actions for each button. Now, the encoder is a scroll wheel, the prev/next buttons are page up/down, the pause/play is a home button, and the encoder wheel press is just a left click on the mouse. I’ve mounted this board to my workbench within easy reach of where I do my soldering. Now I can easily scroll around the documentation on the screen in front of me without needing to dedicate any surface space to a mouse, trackball, or keyboard.
Now I can get to assembling my QRP Labs QCX-mini!