Git Product home page Git Product logo

star-wars-macro-keyboard's Introduction

Star Wars Macro Keyboard

This is a Star Wars theme inspired device that you can connect to your computer and it will act as a fully functional HID keyboard.

Features:

  • 5 configurable buttons
  • A safety switch with a safety LED
  • 2 additional LEDs
  • 3D-printable case

Configuration

In the source code you can define what keycodes will be sent when the buttons are pressed. Check for the Key definitions section and update the values for your needs.

Useful sources:

Safety Switch

This device acts as a HID keyboard when connected to your computer via USB. If the code is faulty there's a chance that it will send random keycodes to your computer that can make uploading a fixed code impossible.

Safety switch to the rescue! If the safety switch is not pressed the keyboard will not send any keycodes to your computer, but keeps the code running on the Arduino, so you can keep it powered and upload new code to it.

Parts List

  • 1pc Arduino Pro Micro - it has a ATmega32U4 chip that provides the required USB capabilities. This board is available in two variants, I used the 5V version.
  • 1pc red LED
  • 2pcs white LEDs
  • 3pcs 220Ω resistors - you may need different values if you use different LEDs or the 3.3V Arduino Pro Micro
  • 5pcs 12×12×7.3mm tactile momentary button
  • 1pc 8×8mm push-button switch
  • 5pcs M3x5 screws (4 for the cover, 1 for fixing the Arduino board)
  • Wires
  • Glue
  • Optional: if you do not want to solder the wires directly to the Arduino you can use right angle pin headers and Dupont connectors. I used jumper wires.

Naming

The following image shows how the buttons and LEDs are named both in the wiring diagram and in the code:

Note that not all parts are functional, some are greeblies.

Wiring

You can see the wiring in the Fritzing file in the wiring folder:

Notes:

  • The H1-H3 (horizontal) and the V1-V2 (vertical) buttons are momentary buttons.
  • The Armed button is a latching switch.
  • You may need to adjust the resistors' values to the LEDs and the Arduino variant you use.
  • The LED V1 and LED v2 must be connected to PWM ports to be dimmable from code.

You can see how I did the wiring in the photos folder.

3D Printable Case

Materials

You will need the following filament colors if you do not want to paint them:

  • Grey for the case bottom and the top and the button frames
  • Matte Black for the top frames
  • Glossy black for the round greeblie
  • White and blue for the button caps and for the stripes
  • Transparent red for the armed LED cap
  • Silver for the data port greeblie's outer rims
  • Gold for the data port greeblie's inner shaft

Needless to say you can choose different colors or paint the parts.

Printing

The 3D printable models are available on Thingiverse and also on PrusaPrinters. I designed the model in Fusion 360 and published both the source files and exported them in STEP format so you can customize it to your needs.

No parts require supports, but you have to rotate some parts upside down and lay the case bottom part to the print bed.

You can print most parts with 0.3mm layer height, but I recommend printing the data port outer rims and the case bottom with 0.2mm. Because the parts are designed to snap fit to each other make sure your first layer width is dialed in correctly or configure elephant foot compensation.

Post processing

The 3D printed parts are designed fit tight tolerance, they should snap fit together, though you may need a little glue to keep them in place.

The button caps are designed with a slightly larger tolerance, but if you still experience some friction when pressing the buttons you can sand their sides.

Labels and Stripes

The labels are not part of the 3D models, I used David Occhino's free Arubesh font to create them with my Silhouette Cameo and matte black vinyl. You can find the files in the labels folder.

Other sources for the Arubesh font:

You can create the stripes either with 3D printer, vinyl cutter or you can simply paint them.

Lessons Learned

It is very easy to create a HID device with the Arduino Pro Micro and there are many tutorials out there to get started:

Interestingly this board has a unique personality and reset is tricky:

When you create a HID device having a physical button that prevents the device to send messages to your computer is a MUST. Otherwise updating the device can be a PITA if your code is buggy.

The tactile momentary button is not ideal for a keyboard. It is not as comfortable as real keyboard keys and the box makes its clicking sound much louder.

You can spend many, many, many hours figuring out how to dress your thing Star Wars style using shapes, stripes and of course greeblies.

External USB-connected numberic keypads are surprisingly cheap.

Acknowledgements

This project was inspired by David E. Madison's Building a DIY Stream Deck and The Smugglers Room. Thanks both for sharing their passion and knowledge with the community.

About the author

This project was created by György Balássy.

star-wars-macro-keyboard's People

Contributors

balassy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

icebluewolf

star-wars-macro-keyboard's Issues

Is the RightTop-v122 correct?

Specifically where the on off switch would rest. To me it seems like there is no opening in the top of the holder. Even when deleting the face there is a small chunk that blocks most of the space in the holder.

Is this a mistake?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.