Code Monkey home page Code Monkey logo

teensy-thumb-keyboard's Introduction

teensy-thumb-keyboard

Handheld tactile switch keyboard for Teensy 3.2 compatible boards.

v1.1 Photo

./images/v1.1_photo1.jpg

Features

  • 60 keys arranged in a 6x10 matrix (uses 16 pins on the microcontroller).
  • Silkscreen has a qwerty layout with number keys arranged in a numpad.
  • Lead free ENIG-RoHs surface finish with 2oz copper.
  • SPI, I2C, and 2 additional GPIOs broken out.
  • Each pin along the edge of the Teensy is connected to one extra pin in the prototyping area.
  • Beginner friendly through hole soldering.
  • Example Arduino sketch firmware provided. Additional details in the Example Firmware Posted project log.
  • Layout is completely customizable in the firmware.
  • qmk_firmware should also work however, I don’t have an example running yet.

Three possible mounting options

  1. Teensy on the front, mounted right-side up, with usb port facing north.
  2. Teensy on the back, mounted upside down, with usb port facing north or south.
  3. Teensy on the back, mounted upside down, with usb port facing south. Note: Breakout pins will only work as expected with USB facing north.

Parts list for a fully working keyboard

  • 1x Teensy 3.2 or Teensy LC. A Butterfly STM32L433 will also work (though not as a USB keyboard).
  • 10x 1N4148 Zener Diodes
  • 60x Panasonic EVQ-PAC04M Tacticle Switches. These are the quieter and higher quality switches. Some are available at digikey. If you wish to use the 3d printed faceplate the overall switch height must be 4.3mm. These models will also work: EVQ-PAD04M EVQ-PAE04M EVQ-PAG04M. Otherwise any standard 6x6mm momentary switch will work.

Ordering

  • Teensy Thumb Keyboard - PCB only Tindie product page
  • Ordering yourself from a PCB manufacturer:
    • https://oshpark.com instructions: upload the kicad pcb file file.
    • https://jlcpcb.com/quote instructions: upload the gerber.zip file The settings I’d recommend are:
      • Layers: 2
      • Thickness: 1
      • Surface finish: LeadFree HASL-RoHs or ENIG-RoHs (don’t want lead on a board you may be typing on)
      • Copper weight: 2oz (1oz is probably fine though, the heavier weight copper stands up better to repeated solder and desoldering I think)
      • Everything else default settings.

Cases

Firmware

  • The layout for USB keyboarding is defined in the usb_key_matrix variable in LayoutThumbKeyboard.h
  • If you don’t need a USB keyboard and are rolling your own hardware project then you can focus on the layout defined by the ascii_key_matrix variable in LayoutThumbKeyboard.h
  • There are three layers defined: base, shift, and Fn layers.
  • USB can be disabled by commenting out define USE_TEENSY_USB_KEYBOARD.
  • All the keyboardy goodness is handled by the keyboard_update(); function called from inside the standard Arduino loop().
  • If you don’t need the keys to behave like a keyboard you can gut most of that example and just use key_matrix.update(); The KeyboardMatrix class handles reading the button states.
  • An alternative firmware option for a pure USB keyboard would be to run the excellent https://github.com/qmk/qmk_firmware.

Compiling on Windows machines

  1. Using a Teensy 3.2 or Teensy LC follow these directions for downloading and installing the teensyduino add-on to the Arduino environment: https://www.pjrc.com/teensy/td_download.html
  2. Once you have both installed. Launch the Arduino IDE and check what version of teensyduino is installed by going to Help > About Arduino. The about window for me shows Arduino 1.8.9 in the upper left and Teensyduino 1.46 in the upper right.
  3. Download the code archive from: https://github.com/AnthonyDiGirolamo/teensy-thumb-keyboard/archive/master.zip
  4. Extract that folder and move the firmware folder to: C:\Users\anthony\Documents\Arduino\firmware Substitute “anthony” with your username.
  5. Rename the firmware folder to teensy32_thumb_keyboard

    The full path should be: C:\Users\anthony\Documents\Arduino\teensy32_thumb_keyboard

    And these files should exist inside there:

    KeyboardMatrix.cpp
    KeyboardMatrix.h
    LayoutAppleM0110a.h
    LayoutCommon.h
    LayoutThumbKeyboard.h
    LinkedList.h
    teensy32_thumb_keyboard.ino
        
  6. Open C:\Users\anthony\Documents\Arduino\teensy32_thumb_keyboard\teensy32_thumb_keyboard.ino in the arduino IDE.
  7. In the Tools menu select USB Type > Serial + Keyboard + Mouse + Joystick
  8. Click the verify or upload buttons in the toolbar. If compilation is successful you should see a message like:
    Sketch uses 27920 bytes (10%) of program storage space. Maximum is 262144 bytes.
    Global variables use 6680 bytes (10%) of dynamic memory, leaving 58856 bytes for local variables. Maximum is 65536 bytes.
        

Uploading the firmware without compiling

If you don’t wish to compile the firmware yourself you can use the precompiled hex files provided in the firmware-compiled folder.

To get them loaded on a Teensy 3.2 or LC download and install the Teensy Loader Application once installed plug in your teensy board and load the correct firmware file:

  • Teensy 3.2: teensy32_thumb_keyboard.ino-teensy32.hex
  • Teensy LC: teensy32_thumb_keyboard.ino-teensyLC.hex

Alternate Versions

teensy-thumb-keyboard's People

Contributors

anthonydigirolamo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

teensy-thumb-keyboard's Issues

keyboard not working

I have ordered the board from JLCpcb, as well as all of the components listed. After soldering everything together, and installing the software, it doesn't work. However, I am testing it just by using it plugged into my MacBook. Is there any troubleshooting tips you'd suggest? I am pretty new to soldering, so I can't tell if it was the soldering, or if it was just me installing the software wrong, so I have attached some pictures as well.

IMG_1706
IMG_1707

Release example firmware compiled .hex files

on linux the arduino IDE & teensyduino are quite bulky and packages are not available on many distributions, plus, i've already soldered my teensy to the board.

could you please release a compiled example firmware .hex file for the standard USB US keyboard behavior? teensy_loader_cli is easier to build and install rather than the whole arduino ide

Different language layout

I build this keyboard successfully and it is working when setting Xorg to an english layout. But most of my computers are set to a different keyboard layout (german). So, when I press '/' on the keyboard I get '-'.

How do I change the send keycode, when using 'usb_key_matrix'? Changing 'Tools->Keyboard Layout' to German in Arduino IDE is not working.

Oneshot Shift/Control/Alt/Super not working

After putting all the parts together i recognise that most of the oneShot function isn't working.
oneshot Fn is working fine, Shift seems to have a problem. With the debug messages i can see that the Keys are transmitted in upper case but only lower keys appear in a text box (Tested on Win10 with German keyboard layout in the system settings, Us Layout in Arduino/Teensy settings). I tried using it on a Raspberry pi (Raspbian Buster) with the Layout in Raspbian set to US but encountered the same issue. I also used the Recompiled hex and got the same behavior.

Maybe there was a change in the Teensy libs. It seems that, for normal characters shift needs to be held to get a upper case Character recognized. If i hold shift while pressing another key it is recognized as a upper case character.

Could you try to confirm it? or am i doing something wrong?

And as far as i can see in the firmware, the code for oneshot Control/Alt and Super is missing.

I will try changing the firmware at the weekend but it would be great to know if i am not the only one with this issue.

Otherwise, great work, it helped me tremendously!

Edit: Forgot to mention that i am using a Teensy LC

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.