Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 2.46 KB

README.md

File metadata and controls

38 lines (30 loc) · 2.46 KB

das-control-panel

A small Arduino-based controller to automate (keyboard) actions.

What features does the example have?

  • Volume control
  • Play/Pause music
  • Previous Track
  • Next Track
  • Mute
  • Lock the screen

My ugly prototype looks like this:

das-control-panel.png

What you will need for the example in this repo

  • An ~Arduino which
    • operates on 5V
    • supports USB HID (Human Interface Device): acts as a keyboard and/or mouse
    • has interrupt pin(s) and pins with pull-up resistors
    • is small
    • check ebay
  • A rotary encoder
    • with a push button
    • check ebay, probably you will find a board with pins
  • A couple of (the example has 4) momentary push buttons (check ebay, there are boards with pins too)
  • A cap for the rotary encoder so that it will look nice
  • Jumper wires if you bought boards and don't need to solder/create PCB
  • A box

Notes

Unfortunately, the Arduino Keyboard lib does not support every key code, accordint to the docs: "Not every possible ASCII character, particularly the non-printing ones, can be sent with the Keyboard library." This means you cannot send wathever key code you want through the wire. Check asciitable.com for the ASCII char codes (some of them are not supported) and the docs or the code for the available modifier keys.

This means that using the Keyboard lib, the Arduino will not be able to send multimedia key events. That's why you can see weird events (Ctrl+Alt+F9) in the example program which are mapped to the real key event using AutoHotKey (Windows) or QuckSilver + AppleScripts (Mac) but you can use any other key mapper solution.

At the moment, the AppleScripts in this repo only support Spotify but iTunes/etc. support is similar, just Google around. The AHK script support anything which listens to multimedia key events.

The wiring should be straightforward, check the pin layout of your Arduino, rotary encoder, push button board and modify the example program if necessary.